1835133 Members
2731 Online
110076 Solutions
New Discussion

Suspending a process

 
SOLVED
Go to solution
Evelyn Daroga
Regular Advisor

Suspending a process

Is there any way to suspend an actively executing process? It is a user process; we do not want to kill it, just put it on "hold" until we can determine what it has done.
8 REPLIES 8
Jeff Machols
Esteemed Contributor

Re: Suspending a process

z will stop a process, not kill it. Then you can run fg and it will start the processes again
Jeff Machols
Esteemed Contributor
Solution

Re: Suspending a process

something else, if its not run from your terminal, you can run kill -24 PID to pasue,
then kill -26 PID to continue
Steven Gillard_2
Honored Contributor

Re: Suspending a process

Yep, you can send it a SIGSTOP:

$ kill -STOP

And to get it running again, SIGCONT:

$ kill -CONT

Cheers,
Steve
Helen French
Honored Contributor

Re: Suspending a process

hey,

Use 'kill -24 pid' to pause a process.

then 'kill -26 pid' to continue.

see man kill for more information

HTH,
Shiju
Life is a promise, fulfill it!
Sridhar Bhaskarla
Honored Contributor

Re: Suspending a process

Do a kill -24 pid on the process to stop. kill -26 pid will resume it.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Deshpande Prashant
Honored Contributor

Re: Suspending a process

HI
You can use the kill command to stop the process.
Here are details on signames

24 SIGSTOP Stop Pause the process; cannot be trapped.
25 SIGTSTP Terminal stop Pause the process; can be trapped
26 SIGCONT Continue Run a stopped process

Thanks.
Prashant.
Take it as it comes.
Anthony deRito
Respected Contributor

Re: Suspending a process

If you are at the command line and have run your process in your current shell Jeffs method will work great. However, if the process is running outside of your shell then use the kill -24 command on the PID to pause the process. Then use the kill -26 command on the PID to resume a paused process. Check out the man page on kill. It also has some good examples at the end.

Tony
Evelyn Daroga
Regular Advisor

Re: Suspending a process

Thanks for all the quick reponses! All answers were very helpful!