Help - Search - Members - Calendar
Full Version: Broken Nohup
Linuxhelp > Support > Technical Support
Hi All -
I have a bit of a problem with nohup. I am running Redhat 9 in a lab, same installation discs as another box in lab. When I log out of my machine, my processes (3-day long mathematical jobs) go defunct and continue to use memory. When I launch jobs, I use

$nohup filename &

Everything I have read says this should launch the process in the background and prevent a SIGHUP from killing the child processes of this. I have compared /usr/bin/nohup files with the other Linux machine, and they check out. Any help with anything would be much appreciated.

Not sure if this fixes your memory leak problem which could be a problem with the application you are running itself, but I find it easier to press ctrl+z then type bg to send my processes to the background.
When you use nohup, there is a file called nohup.out that is created and contains errors/output from the process. nohup.out is normally created in the directory the file is run from (if the user has permission to create files in that directory) or in the user's home directory (if the user can't write in the directory where the command was issued).

The contents of nohup.out might shed some light on the problem.

I use nohup to start several processes at boot time as other users on several different UNIX and Linux systems without problem ... and the way you started the application is correct.

If nohup isn't working for you, you can use at to start processes at specific times and not be logged in as well.
Thanks for responding guys. The nohup.out file that gets created in the working directory never has anything in it. Is that normal? Also, I tried using the ctrl-z method, and I get the same results. Is there any way to return /usr/bin to its defaults using the install discs? I'm afraid I don't have the know how to troubleshoot this on my own.
try the command:

at now

you should see a prompt like this:


Type in the command you normally use ... or to a script (minus the nohup or the &) and press enter.

Press Ctrl-D to exit.

See if the command starts running correctly ... then exit as that user, log back in and see if it is still working.
I did what you recommended, hughes. Using the "at now" command, my process never even started running. It did, however, send an error message to my /var/spool/mail, and it looks like the problem is in fact the result of a utility within the program. I realize you probably can't really help with that, but I appreciate all the help.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.