![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here! |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Are companies viewing my resume? How do I track my resume visits? | gearyipswich | What's on Your Mind? | 1 | 04-01-2008 06:58 PM |
| I can't resume a process after stopping it! | Nene | Shell Programming and Scripting | 0 | 08-09-2006 10:37 AM |
| ftp resume feature | ppass | SUN Solaris | 2 | 07-30-2006 06:11 AM |
| resume mount connection | ust | UNIX for Advanced & Expert Users | 2 | 03-31-2005 05:42 AM |
| continue the suspended jobs | killerserv | UNIX for Advanced & Expert Users | 6 | 01-09-2002 11:09 PM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
resume the suspended background job
Hi,
I was running a job in background and because of some immediate work to be done on my machine, I stopped the background job. The real problem comes when I try to restart the same job in the background. To stop I used stop PID and to resume the same I use bg PID when I do this the system says "bg: No such job". Even the job PID is there with stat 'T'. The job has been started from one terminal and has been stopped in another terminal but now I want to restart with some other terminal and it does not work with the PID. Does anyone come across this kind of problem. Please suggest the solution. Best Baloo Last edited by baloo_mia : 04-20-2008 at 12:49 PM. |
| Forum Sponsor | ||
|
|
|
|||
|
fg and bg use job identifiers, not PIDs (that's why it says "no such job" -- you probably don't have like 20742 jobs in that shell). If you know the PID, you can send it a CONT signal:
Code:
kill -s SIGCONT $PID You can't reconnect it to another terminal than the one it was started in. It will continue to run on the terminal where you started it (or possibly terminate or crash if that terminal is no longer available). |
|
|||
|
Thanks for the prompt reply and making clear the concept associated with stop and bg.
I tried running some dummy job on first terminal and then 'stop' in second terminal using PID and finally using third terminal to restart the background suspended job same PID and it worked the command I used was.. Code:
kill -s CONT $PID once again thanks. best baloo Last edited by Yogesh Sawant : 04-21-2008 at 01:23 AM. Reason: added code tags |
|||
| Google UNIX.COM |