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
resume the suspended background job baloo_mia Linux 2 04-20-2008 02:27 PM
awk continue anhtt Shell Programming and Scripting 3 03-11-2008 08:08 AM
continue example xramm Shell Programming and Scripting 7 07-03-2007 12:10 AM
background jobs exit status and limit the number of jobs to run GrepMe Shell Programming and Scripting 1 06-11-2007 03:56 PM
Will the continue function work ???? kamlesh_p Shell Programming and Scripting 2 10-12-2005 05:27 AM

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-09-2002
killerserv's Avatar
Unix Predator
 

Join Date: Dec 2000
Location: Phoenix, AZ
Posts: 670
Question continue the suspended jobs

Guys,
Any idea how to continue suspended job in background ?
ihave tried to use the bg% command <root> but it doesnt work.

unix> jobs
[1] +suspended du > usage
[2] -suspended (sleep 60; date)
unix> bg %2
[2] (sleep 60; date)

But my suspended work doesnt seems to continue run in background.. Any idea ?
Forum Sponsor
  #2 (permalink)  
Old 01-09-2002
thehoghunter
Guest
 

Posts: n/a
You should be able to get back with the fg command (your OS may vary)
  #3 (permalink)  
Old 01-09-2002
Registered User
 

Join Date: Oct 2001
Location: Bangalore
Posts: 93
Hunter,
fg% can bring the job to foreground. What actually killerserv wants is run the stopped process in the background.

I have tried to resume a stopped process with bg%.
but the job is still not running although it may be in the background. I am having similar observations as Killerserv had..
  #4 (permalink)  
Old 01-09-2002
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,355
Well it works for me. After you background a job, does the "jobs" command say it is running? Does "ps" say it is running?

And bear in mind that if a background job attempts to write to the controlling terminal and the controlling terminal has tostop set on, a SIGTTOU will be sent to the background process. If that is happening and you don't want it to, then type "stty -tostop".
  #5 (permalink)  
Old 01-09-2002
Registered User
 

Join Date: Oct 2001
Location: Bangalore
Posts: 93
Hi!,
I have set the terminal options to "stty -tostop".

now this is what I get when I try to run the VI editor in background which definitely needs a terminal to write.

unix> bg %1
[1] vi test&
unix> jobs
[1] + Stopped (SIGTTOU) vi test

Is it happening bcoz VI is basically an interactive foreground process and so cant run in background?
  #6 (permalink)  
Old 01-09-2002
killerserv's Avatar
Unix Predator
 

Join Date: Dec 2000
Location: Phoenix, AZ
Posts: 670
jyothi,
ive tried that same result on myside.. but i did set stty -tosusp and try both susp and stop:

Could execute vi in background.. At last..
I think should try stty -tosusp instead of stop. I can recall back the vi editor. Works for me
  #7 (permalink)  
Old 01-09-2002
Registered User
 

Join Date: Oct 2001
Location: Bangalore
Posts: 93
"stty -tosusp" is not recognised by my OS, i.e Solaris-5.6. It flags an error
Google UNIX.COM
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:11 PM.


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

Content Relevant URLs by vBSEO 3.2.0