The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
script to monitor process running on server and posting a mail if any process is dead pradeepmacha Shell Programming and Scripting 12 10-17-2008 12:08 AM
Can a child process return a specific value to a parent process ? Ametis1970 High Level Programming 8 04-09-2008 08:22 PM
Killing of a process and send a mail if the process doesnot come up within 2 minutes Prince89 Shell Programming and Scripting 1 02-15-2008 04:10 PM
how to start a process and make it sleep for 5 mins and then kill that process shrao Shell Programming and Scripting 6 03-27-2007 09:54 AM
my process is going to sleep mode after 12 hours but i need my process in in firsy pr mukesh_rakesh1 UNIX for Advanced & Expert Users 0 09-04-2006 11:43 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 07-20-2002
Registered User
 

Join Date: Jun 2002
Posts: 50
backgroud process

Hi experts


How to write a shell program(sh) that running on the backgroud when foreground processing something, such as prompt ....... till the background process finished.


thx
Forum Sponsor
  #2  
Old 07-20-2002
Registered User
 

Join Date: Jul 2002
Location: void
Posts: 53
Just include the & at the end of your shell script when you run. Like:
Code:
sh script &
  #3  
Old 07-21-2002
Registered User
 

Join Date: Nov 2001
Location: New Zealand
Posts: 333
Have a look at "nohup" as well...
__________________
Pete
  #4  
Old 07-23-2002
Registered User
 

Join Date: Jul 2002
Posts: 4
nohup command &
  #5  
Old 07-23-2002
Registered User
 

Join Date: Nov 2001
Location: New Zealand
Posts: 333
Oh yeah....and once the program is running in the background you can kill it wil a ctrl+c...if it runs for a long time and you need to stop it - you'll need to KILL it.

ps -fu username

Then 'kill <<PID>>' where the PID is the processid column int he ps output.

Quite important really if the process isn't self terminating!
__________________
Pete
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:51 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0