Posts

Showing posts with the label posix

killing trees of Unix processes

Unix semantics around processes and signals are a bit gnarly. One issue I have with signals is that they conflate doing some simple IPC with a process, and doing something to a process.  In other words, the catchable signals and the uncatchable signals (and perhaps uncaught catchable signals -- it would depend on the design) are such categorically different items, that they should not be lumped together under "signals".  You want to kill a process, you kill it.  It doesn't have a say.  You want to let a process know about something, request it do something, whatever, great, you talk to it, that's a different thing. An issue I have with processes is that they are apparently hierarchically organised, via each process's parent process id, which is established at fork time, but this hierarchy is hard to make use of, and easily falls apart.   Trees of processes naturally represent useful things.  The OS as a whole is the tree rooted at (conventionally) init...