Wednesday, July 06, 2011
Linux Shell, HUP and process status on logout
The shell can be configured to send a HUP signal to its children when the shell exits. This is controlled by the huponexit shell option as explained in the bash man page:
If the huponexit shell option has been set with shopt, bash sends a SIGHUP to all jobs when an interactive login shell exits.
Determine the setting of huponexit with:
If it is "off", then processes started by the user will remain running after logout. This setting makes it easier to start a long running process simply from within the shell, without invoking a screen and without having to wrap the process in nohup.
Here is a discussion on the issue.
However, this setting seems to cause problems for interactive sessions when a new user could start referring to an old user's now invalid processes.
Posted by thushara at 12:17 PM