On Mon, Oct 05, 2009 at 10:05:15AM -0700, Robert Hajime Lanning wrote: > On Fri, Oct 2, 2009 at 5:00 PM, Josef Wolf <jw@xxxxxxxxxxxxx> wrote: > > This works great! But there's one drawback: at the end of every session, > > a "Killed by signal 1." error is reported. This, of course, gives me a bad > > feeling. BTW: the signal number varies, sometimes it is 1, sometimes it > > is 2. [...] > Signal 1 is SIGHUP, the HangUP signal. This is sent by shells, to all their > children (backgrounded commands) at exit. It tells everything that the terminal > (modem) has hung up. This allows the backgrounded commands to catch > that the session has ended and gracefully exit. Minor correction: it's sent by the terminal driver (i.e. the kernel) to all processes in the foreground process's process group. W. Richard Stevens has a good discussion of this in Advanced Programming in the Unix Environment, Chapter 10 on signals, though other good references exist as well. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D
Attachment:
pgpzP3gP7P1wj.pgp
Description: PGP signature