Re:Interesting new Unix commands/binaries in OS X Mountain Lion
by djeikyb on Saturday July 28, 2012 @10:47PM
(#4307337)
This is awesome. Do you have it written up in a blog post by chance? I'd love to link it to this answer: http://askubuntu.com/questions/27501/whats-the-difference-be...
Re:Interesting new Unix commands/binaries in OS X Mountain Lion
by bcantrill on Sunday July 29, 2012 @01:46AM
(#4307667)
No blog post, no -- but you can link to my HN comment[1]. Also, as long as I'm commenting again on this, I should point out that pkill also had an Easter egg of sorts: "pkill -V" was a shorthand for killing everyone's least favorite Solaris daemon: vold. (This option was ripped out when vold itself was ripped out in 2006.)
Re:Interesting new Unix commands/binaries in OS X Mountain Lion
by blinkingled on Sunday July 29, 2012 @11:53AM
(#4308773)
So instead of fixing fork to be faster Mike just reduced the number of forks? Kidding, kidding...
If my long-windedness can be excused, a pgrep anecdote that I feel must be told: when Mike was originally doing pgrep and pkill, he wanted one to be able to search on every field specified in proc(4), including the wchan (denoted by pr_wchan), an archaic field that was actually a stowaway from Multics (!). Even by Solaris 7, the wchan had no real significance in Unix, and the co-inventor of /proc, Roger Faulkner, flew into an indignant rage that Mike would include it -- and "pgrep -w" quickly disappeared from both Mike's workspace and his PSARC case. Now, Mike and I were also the gatekeepers on Solaris 7, and we both wore pagers (aside: I'm old) that would page us whenever anyone integrated anything into Solaris with the bug synopsis. Sometime after pgrep/pkill integrated into Solaris 7, I decided to screw with Mike a little: he was headed to watch a Boston Celtics playoff game, and I knew he would be away from a machine for a few hours, so I started paging him with fake integrations that I knew would enrage him. The first integration that I fooled him with was someone that he disliked rewriting a command that Mike himself had just taken from the same engineer and himself rewritten -- and I really tweaked him by making the synopsis be that the "error messages could be improved" (trust me that this was a sore point). Now, I wanted the fake integrations to get more and more absurd over the course of the playoff game, so I next paged him with an integration from Roger: "pgrep(1) needs to be able to search on wchan". I was just getting ready to send my next page (after all, I had a couple hours of mischief planned) when Mike suddenly appeared in my office, drenched with sweat, panting "please just tell me the first one was a joke too!" As it turns out, he had taken my first page a little too seriously, had immediately stopped watching the playoff game, got back in his car and was returning to work to "throw [disliked engineer]'s monitor out his office window." When he saw the wchan option to pgrep, he knew that I must be screwing with him, and fortunately stopped at my office before doing anyone (or anything) physical harm. And that's how "pgrep -w" saved a monitor -- if not a life.