zetalyrae roasts production C: procps /bin/kill snippet sparks bug hunt

zetalyrae · x · 2026-11-04

zetalyrae shares a snippet from procps 4.0.4 (the provider of /bin/kill in Ubuntu 24.04 LTS), exclaiming "every time I read a snippet of production C code I lose my mind." The screenshot shows getoptlong handling with a special case for negative-PID signals — hand-building the pid via ('0' - optopt) and suppressing opterr to swallow errors on -123 — framed as a "can you spot the bug?" challenge.

Related event: Viral procps code snippet sparks debate over production C quality(3 posts)→

Original post →

More from Fun

Fun channel →