Tuesday, January 10, 2012

Default action for SIGHUP

Q: Why program is killed if I log out the bash and why it survive if using nohup?

A: When log out, the bash will generate the SIGHUP to progress attached to it. If there is no default routine in progress to handle this signal, kernel will use the default action (terminate for SIGHUP).
More information see section 10.2 of "Advanced Programming in the UNIX Environment" or http://www.win.tue.nl/~aeb/linux/lk/lk-10.html .

Post a Comment