Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

suspend job of other terminal

Status
Not open for further replies.

pankajpanjwani

Technical User
Mar 25, 2002
24
EU
Hi experts,
Is it possible to suspend a job which was run in past through a terminal which do not exist now. The job may be running in background but the terminal was closed down for some reason.

I tried kill -STOP pid and kill -CONT pid. Did not work as expected.



Pankaj
 
Before a kill -9 I would try a kill -15 to give a chance for gracefull termination of the job.
 
just to calrify my point.
I donot want to KILL that job, I want to immitate Ctrl-Z and "fg"/"bg" behavior with "kill" command.

I hope this calrifies that it needs to be suspended (and not killed) so that i can again run it.

Pankaj
 
The only way that a process can continue to run after the shell has terminated is for the initial process to be started with a nohup (in which case the init process will take control), have it running on a pseudo terminal or via a scheduler such as cron. Otherwise the process itself will terminate along with it parent shell/process as and when that dies.

I would suggest you install a pseudo terminal package such as "screen". Once installed you can configure screen to leave your processes unaffected even if the parent shell dies. I personally use this option and have my profile check for screen shells during the login process, which then prompts me to re-attach or login as usual.

So if you had a suspended job, you could hook back into it precisely where it left off. Is that what you want?

ART
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top