NOHUP

My objective is to keep a job running even when the connection is terminated. How to use nohup when running a script?thx
[134 byte] By [Linda_B] at [2007-11-26 11:34:24]
# 1
well, that's what i donohup command &for examplenohup ./script &you can then close the termainl and later check the file named nohup to see how did the scirpt excution process go.Rgrds
Haythammorsy at 2007-7-7 3:50:16 > top of Java-index,General,Sys Admin Best Practices...
# 2

All nohup does is block a HUP signal from being sent to the process when the shell exits. Some scripts like /bin/sh don't do that. Rarely, some applications ignore HUP.

How you enable or disable job control is shell-dependent.

man sh

man bash

man nohup

man -s 3HEAD signal

wsanders at 2007-7-7 3:50:16 > top of Java-index,General,Sys Admin Best Practices...
# 3
I don't believe that nohup will disconnect STDIN from the shell in all cases. When you log out, if you take STDIN with you, some programs might complain. You should also redirect STDIN to /dev/null if it's not already redirected.-- Darren
Darren_Dunham at 2007-7-7 3:50:16 > top of Java-index,General,Sys Admin Best Practices...
# 4
If you are interested in knowing how the program is doing later on you could always download and use an utility called 'screen'. Screen will allow you to detach an and later reattach the shell running the command. .7/M.
mAbrante at 2007-7-7 3:50:16 > top of Java-index,General,Sys Admin Best Practices...
# 5
Also have a look at screen, it should be in /opt/csw/bin/screen
mikelut at 2007-7-7 3:50:16 > top of Java-index,General,Sys Admin Best Practices...