Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 15th November 2007, 09:58 AM
gimli Offline
Registered User
 
Join Date: Dec 2005
Posts: 28
shell script -> starting a process detached from the parent process in the background

hello,

i have 2 problems in shell script, which i could not solve.

I will start in the main script another shell script, but the main script should go on directly, without waiting for the started script. Like starting a shell script in the background but independent from the parent shell/process.

so the main script schould start another script without waiting till its ends and this process must be independent from other processes. So that i kann kill a terminal in witch the main script was started, without ending the process in the background!

thanks
Reply With Quote
  #2  
Old 15th November 2007, 10:06 AM
daverj Offline
Registered User
 
Join Date: Jan 2006
Location: Denver, CO USA
Posts: 670
Code:
nohup cmd &
nohup lets you exit without killing child processes. & puts the command in the background.

davidj
Reply With Quote
  #3  
Old 15th November 2007, 10:22 AM
gimli Offline
Registered User
 
Join Date: Dec 2005
Posts: 28
i have tested it with "nohup cmd &" in the main script. i have started the main script in a xterm. wehen the main script is finished, the shell scrpt witch was started with "nohup ..." is running in the background.
BUT:
When i close the xterm, the shell script "nohup .." in the background, will be killed!

ben
Reply With Quote
  #4  
Old 15th November 2007, 11:06 AM
daverj Offline
Registered User
 
Join Date: Jan 2006
Location: Denver, CO USA
Posts: 670
so, you are running a script from the commandline and in that script you call another script using nohup?

Try running the main script with nohup.

davidj
Reply With Quote
  #5  
Old 15th November 2007, 11:11 AM
gimli Offline
Registered User
 
Join Date: Dec 2005
Posts: 28
yes.

running main script with nohup also does not work!

thanks
Reply With Quote
Reply

Tags
>, background, detached, parent, process, script, shell, starting

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
start a process and let its parent die bee Using Fedora 8 9th July 2008 03:51 PM
shell script to copy files from subdirs to parent dir dtra Using Fedora 2 16th March 2008 02:39 AM
Is it possible to Run a process in background? su_jumptd Using Fedora 4 5th April 2007 04:18 PM


Current GMT-time: 20:17 (Monday, 22-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat