Operating System - HP-UX
1830503 Members
2474 Online
110006 Solutions
New Discussion

Is it possible to suspend and later resume a process?

 
SOLVED
Go to solution
Jack C. Mahaffey
Super Advisor

Is it possible to suspend and later resume a process?

I got a backup job that hogs the network. I'd like to periodically suspend the process and then resume it. Is there a way on 11.0 to suspend and resume a process?

Thanks... jack...
4 REPLIES 4
Jeff Schussele
Honored Contributor
Solution

Re: Is it possible to suspend and later resume a process?

Hi Jack,

Absolutely - use kill as follows:

kill -25 PID #25 = SIGSTP

then use this to continue

kill -26 PID #26 = SIGCONT

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Eric Antunes
Honored Contributor

Re: Is it possible to suspend and later resume a process?

I don't now a way of doing this after executing the comand, but I now a way before: use nice (man nice for more info.)
Each and every day is a good day to learn.
Jack C. Mahaffey
Super Advisor

Re: Is it possible to suspend and later resume a process?

Thanks Jeff... Just what I was looking for...
:)
Muthukumar_5
Honored Contributor

Re: Is it possible to suspend and later resume a process?

hai,

You can easily do in shell with kill. We can do it with c coding with pause() call and raise() or kill() call.

It will be suspended upto getting the signal.We can execute the backup from c coding with system() command :)

Regards,
Muthukumar.

Easy to suggest when don't know about the problem!