[prev in list] [next in list] [prev in thread] [next in thread] 

List:       secure-shell
Subject:    Re: ssh and netcat
From:       Derek Martin <code () pizzashack ! org>
Date:       2009-10-14 18:02:05
Message-ID: 20091014180205.GD20321 () dragontoe ! org
[Download RAW message or body]


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@raven.inka.de> 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 #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic