The complete answer (was Re: so-called-hang-on-exit)

Frank Cusack fcusack at fcusack.com
Thu Aug 8 15:22:06 EST 2002


On Wed, Aug 07, 2002 at 10:12:51PM -0700, Frank Cusack wrote:
> Interesting.  If you look at linux/drivers/char/tty_io.c:disassociate_ctty()
>  you can see that SIGHUP and SIGCONT are sent.  disassociate_ctty() is called
> from linux/kernel/exit.c if the exiting process is the session leader.
> Yet Linux has the problem.

uhhh from the comment for disassociate_ctty():

 *      (1)  Sends a SIGHUP and SIGCONT to the foreground process group

which jibes with Goodheart & Cox (although they are not 100% clear on this).

Then again, from kernel/exit.c:

/*      
 * Determine if a process group is "orphaned", according to the POSIX
 * definition in 2.2.2.52.  Orphaned process groups are not to be affected
 * by terminal-generated stop signals.  Newly orphaned process groups are
 * to receive a SIGHUP and a SIGCONT.

/fc



More information about the openssh-unix-dev mailing list