Oommen Thomas <oommen@...
1999-04-07 09:02:42 GMT
On Wed, 7 Apr 1999, Glynn Clements wrote:
glynn> Oommen Thomas wrote:
glynn> > glynn> > AFAIK, unless we spec a 'nohup' any user process running in the
glynn> > glynn> > background, will terminate once s/he logs out.
glynn> > glynn>
glynn> > glynn> Not necessarily. The process will receive SIGHUP. The default
glynn> > glynn> disposition for SIGHUP is to terminate the process, but a program can
glynn> > glynn> override this if it wishes.
glynn> > But stty -a shows hupcl as default.
glynn> That has nothing to do with SIGHUP; it's actually the opposite.
glynn> `stty hupcl' causes the modem to be hung up when the last process
glynn> closes the tty.
glynn> SIGHUP is sent to the foreground process group when the serial driver
glynn> detects a hangup.
glynn> > Why then does background processes not get killed at all, when user logs
glynn> > out ? This happens with even simple shell scripts - say I have one with
glynn> > 'tail -f /etc/passwd' which if run in background, remains (sleeping)
glynn> > unatttached even after logging out.
glynn> SIGHUP is only sent to the foreground process group.