Hi Neale, 2008/11/6 Neale Pickett <[EMAIL PROTECTED]>: > "Donald Chai" <[EMAIL PROTECTED]> writes: >> On Tue, Nov 4, 2008 at 9:09 AM, Neale Pickett <[EMAIL PROTECTED]> wrote: >>> Reparenting everything to init with the double-fork is a nightmare on a >>> many-user machine, especially when I'm logged in more than once. pstree >>> becomes useless. This sets up a SIGCHLD handler and only forks once. >>> Adds 2 SLOC, but surely there's some reason the double-fork is there that >>> I'm just missing... >> >> If you quit dwm, what happens to any programs that you've launched? > > Nothing, the setsid() call makes children process group leaders so they > don't receive any of the signals the parent gets.
Well, I remember there was a problem with the SIGCHLD signal handler, I need to recheck with Stevens tomorrow. It might be that this was on some ancient UNIX though. But the double-fork is definately the most portable solution. Kind regards, --Anselm