LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-22-2005, 11:06 AM   #1
vinayuh
LQ Newbie
 
Registered: Jul 2005
Location: Dallas, TX
Posts: 2

Rep: Reputation: 0
Post 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
 
Old 07-22-2005, 12:02 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
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?
 
Old 07-22-2005, 12:21 PM   #3
vinayuh
LQ Newbie
 
Registered: Jul 2005
Location: Dallas, TX
Posts: 2

Original Poster
Rep: Reputation: 0
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
 
Old 07-22-2005, 12:24 PM   #4
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nohup and Background Jobs Onyx2316 Linux - Newbie 3 02-28-2012 12:10 AM
nohup retuncode krusty_lab Linux - General 2 10-13-2005 06:04 AM
nohup command chbin Slackware 1 03-31-2005 03:47 AM
How to nohup an already running program ? fluppi Linux - General 0 06-29-2004 03:47 AM
nohup failure tn1681 Programming 1 01-09-2003 05:40 PM


All times are GMT -5. The time now is 07:01 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration