1848401 Members
2866 Online
104026 Solutions
New Discussion

Re: nohup doesnt work

 
Sachin_29
Advisor

nohup doesnt work

Nohup doesnt work for me ..Tried on Aix and Sunos. Is there any settings that needs to be checked?
7 REPLIES 7
Michael Schulte zur Sur
Honored Contributor

Re: nohup doesnt work

Hi,

set -v. Please be verbose. We need more details.

thanks,

Michael
Geoff Wild
Honored Contributor

Re: nohup doesnt work

How are you running it?

Should be like:

nohup yourscript &


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
A. Clay Stephenson
Acclaimed Contributor

Re: nohup doesnt work

All nohup does is exec a command that is set to ignore SIGHUP's and SIGQUIT's and to redirect stdout and stderr. It certainly works as advertised. Typically, problems arise because a given process is expecting to be connected to a terminal or because nohup.out cannot be created --- possibly permisssions or filesystem space.

It would help to know what you are trying to do.
If it ain't broke, I can fix that.
Sachin_29
Advisor

Re: nohup doesnt work

yeah geoff
Mike didnnt get any verbose nohup test.sh -v ?
Michael Denney
Valued Contributor

Re: nohup doesnt work

As Clay mentions, some processes expect to be attached to a terminal and will there for quit when you exit, even if you ran the process as "nohup". The only work around I have seen on hpux to this issue is to run the process with "at" instead.

at -f "script name" now
Sachin_29
Advisor

Re: nohup doesnt work

It executes the script but it cancels it once i log out!!!
A. Clay Stephenson
Acclaimed Contributor

Re: nohup doesnt work

I assume that you are starting the command in the background via '&'. One thing that can cause this is a signal handler for SIGHUP could be installed in the process so that the nohup has no effect. This is unlikely if this is a shell script because traps cannot be set to respond to a signal that was set to be ignored upon entry into the current shell. I suspect what is really happening is that your process is looking for input on stdin and it is seeing EOF and terminates.
If it ain't broke, I can fix that.