A Decade of Kill Bugs
35 points by acg
35 points by acg
Oh dear, this is the kind of slapstick that’s so painfully cringe it’s just sad.
I was a bit surprised by the early history: my guess would have been that killing a negative PID was introduced with the rest of the process group / job control features in BSD in the early 1980s. So I had a look in the CSRG archives:
userland kill(1) gained support in 1986 (same year as mentioned in the article) with a terse note that the kernel already supported it https://svnweb.freebsd.org/csrg/bin/kill/kill.c?r1=22692&r2=27200
the kernel code was provided by Sun the previous year https://svnweb.freebsd.org/csrg?view=revision&revision=18336
the man page (also 1985) says the feature was added for compatibility with System V https://svnweb.freebsd.org/csrg/lib/libc/sys/kill.2?r1=20034&r2=20999
I don’t know of an archive of System V source code from the 1980s so that’s as far as I’ll look.
Yeah the historical question still interests me. Did V9 really originate negative pid killing via /bin/kill, or did System V or SunOS already have it? If the main use case was shell job control, maybe there wasn't yet a good reason to expose it. The extent of my spelunking for the post was TUHS, the unix-history-repo, and playing around with kill on old unixes in the browser via v86.
I thought this was a great article. I appreciate the length they went to digging into the topic and contextualized it with historical facts. Like I didn’t know process groups were a thing and have been a thing since 1986. So much more to learn about.
Thanks for sharing.