Join Nostr
2026-11-30 20:40:43 UTC

argv[-1] on Nostr: Huh. I once was told that #Linux sysfs files have some special quirks, most notably ...

Huh.

I once was told that #Linux sysfs files have some special quirks, most notably that you have to read() them all in one go; the kernel won't buffer their contents if you try to partially read() them.

Apparently that got fixed at some point, because read()ing one byte at a time seems to work fine:

$ dd if=/sys/devices/system/cpu/modalias of=/dev/stdout bs=1
cpu:type:x86,ven… [trimmed for brevity]

Works on 5.4.17 and 7.2.12.