continuing a process
Ethan Merritt
merritt at u.washington.edu
Wed Jun 12 13:16:29 PDT 2002
On Wednesday 12 June 2002 11:42, 'Huge Nerd' Doug McLean wrote:
>
> I have a quick question. I have user who wants to run a program even
> when she is not logged in. We tried the nohup command to no avail.
> CAn you folks suggest another way to keep the program running?
If your shell is [t]csh then nohup should be sufficient (and in fact is
probably the default).
In bash it's more complicated. Here is the relevant section of 'man bash':
The shell exits by default upon receipt of a SIGHUP. Before exiting, it resends
the SIGHUP to all jobs, running or stopped. Stopped jobs are sent SIGCONT to
ensure that they receive the SIGHUP. To prevent the shell from sending the signal
to a particular job, it should be removed from the jobs table with the disown
builtin (see SHELL BUILTIN COMMANDS below) or marked to not receive SIGHUP using
disown -h.
If the huponexit shell option has been set with shopt, bash sends a SIGHUP to all
jobs when an interactive login shell exits.
Ugh. Messy. Yet one more reason not to use bash.
(Says this long-time tcsh user).
--
Ethan A Merritt merritt at u.washington.edu
Biomolecular Structure Center Box 357742
University of Washington, Seattle, WA 98195
phone: (206)543-1421
FAX: (206)685-7002
More information about the Linux
mailing list