How to make processes stay alive after a logout ----------------------------------------------- It is common for Athena users to want a process to stay alive after a logout, on a private workstation. (Cluster workstations and dialups deliberately do not allow this behavior.) To make this happen, one must understand why the process is dying after logout. Here are possible reasons: * After logout, the process will no longer have access to the tty it is running in. Writing output or reading input will tend to cause the process to die or be suspended. Countermeasure: Redirect input, output, and error output to /dev/null or a log file, or run the process under screen. * After logout, the user's tickets and tokens are destroyed, so the user will no longer have access to AFS or any services which require tickets. Countermeasure: Run the process in a separate PAG using newpag. If necessary, run the process with separate ticket files. * If the user does not have a permanent place in the passwd file, the workstation will kill the user's processes when it reactivates, using the "cleanup" command. Countermeasure: Make sure the user is listed in /etc/passwd.local. * If the user uses bash, background processes will receive a HUP signal on logout. (tcsh does not do this; only the foreground process group gets a HUP on logout under tcsh.) Countermeasure: Run "disown -h %jobnum" before logging out, or (not recommended) run the process under nohup. Note that "nohup" is only marginally useful. It is totally unnecessary for background processes under tcsh. Bash users may benefit from using nohup, but note that on Red Hat Linux systems, /usr/bin/nohup also takes care of output redirection, which may either be helpful or confusing. (In tcsh, nohup is a shell builtin, so /usr/bin/nohup won't be used unless referred to explicitly.) It is simplest to just not recommend nohup to users, and instead tell them to take the countermeasures recommended above.