home.social
  1. @stuartmarks amusingly a few posts before this in my feed was complaints about namespace pollution from the Xlib.h header having for things like “Status” and “None” due to decisions made nearly 40 years ago, when X was just a fun experiment, not core system API.

  2. @bsmaalders @cks writing a temp file and renaming it also avoids the failure-to-truncate issues found in screenshot cropping tools recently (), but as some folks at work recently discovered, you need to be sure to fsync() before the rename, or a failure at the wrong moment can leave you with a zero-length file instead of the old one as the directory metadata can get written before the file contents data on ZFS.