LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   help on nohup (https://www.linuxquestions.org/questions/linux-general-1/help-on-nohup-345733/)

vinayuh 07-22-2005 11:06 AM

help on nohup
 
Hello!

I am running into a problem using nohup command. I need to run two processes in the background. Is there a restriction on how many I can run using nohup?
So my commands are

1) nohup ./startxxx.sh > xxx.out &

2) nohup ./startyyy.sh > yyy.out &

now if I close the console window on which I started xxx.sh, it still keeps running in the background. But the yyy file is killed as soon as I close the window. is it because I can use only one nohup for one user??

Any help on this is appreciated!!

Thanks in advance!
~Vinay

Matir 07-22-2005 12:02 PM

Several points of note here are: nohup will capture any output to a file nohup.out, so your output redirection will see... nothing. :)

Secondly, you should be able to nohup any number of processes, but it's possible for a process to look for the terminal it was attached to or so forth. Does the order in which you launch the processes affect things? If you only launch the one you attempted to launch second, and then close the window, does it continue to run?

vinayuh 07-22-2005 12:21 PM

I will try the second paragraph you suggested.
But the output re-dir thingy is not true. it does write to nohup.out but if I redirect it then it'll write to the text file and I am able to tail on it. I will try executing the second command first and then try.
But otherwise is there anything I am doing wrong??

Thanks a bunch for your time!!
~Vinay

Matir 07-22-2005 12:24 PM

wow. I stand corrected. That's actually really useful to know. I guess it detects if stdout == /dev/stdout or if it is a file, and handles it appropriately.


All times are GMT -5. The time now is 06:11 PM.