The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Why the nohup-ed background process always is "stopped" ? meili100 UNIX for Advanced & Expert Users 1 05-27-2009 05:27 AM
"service" , "process" and " daemon" ? shipon_97 Red Hat 1 05-24-2009 04:51 PM
using mutiple "nohup" to execute multiple commands. aster007 Shell Programming and Scripting 2 03-06-2009 12:35 PM
How to include RETURN KEY with Background process "&" in Shell Script racbern Shell Programming and Scripting 1 03-11-2008 07:30 AM
"nohup" and "&" commands xadamz23 UNIX for Dummies Questions & Answers 1 08-12-2003 05:31 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-26-2009
meili100 meili100 is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 33
Why the nohup-ed background process always is "stopped" ?

I let a script A call script B.
I used
Code:
 nohup a.sh &>/tmp/log &
In script A it calls B directly, without any redirecting or nohup or background.

However A is always "Stopped", while B is running correctly. Anybody knows why?
thanks!

-----Post Update-----

BTW, if I don't use nohup and backgrounding, it's OK. i.e. if I use
Code:
a.sh
directly. Everything is OK. I am totally confused.

Last edited by meili100; 05-27-2009 at 01:41 AM..
  #2 (permalink)  
Old 06-02-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,886
I'm confused too. Unless a.sh is reading from the tty or stdin, it shouldn't stop. Can you post the code up until the time script B is called?
  #3 (permalink)  
Old 06-02-2009
devtakh devtakh is offline
Registered User
  
 

Join Date: Oct 2007
Location: Bangalore
Posts: 514
Code:
nohup a.sh >/tmp/log &
  #4 (permalink)  
Old 06-02-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,886
The script a.sh calls itself?
  #5 (permalink)  
Old 06-02-2009
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,183
Quote:
nohup a.sh &>/tmp/log &
Maybe try.

Code:
nohup a.sh 2>&1>/tmp/log &
i.e. If your script is producing an error or asking a question you may need to capture all output. Pure guesswork until we see what is in the scripts.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:48 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0