Suspending processes - (nf)
wagner at iaoobelix.UUCP
wagner at iaoobelix.UUCP
Tue Jan 13 12:29:00 AEST 1987
/***** iaoobelix:comp.unix.ques / A60!lee / 4:13 pm Jan 9, 1987*/
> Does UNIX provide a standard way to suspend a processes ( stop it
> from getting CPU time )?
> --
> Gene Lee UUCP: ...ihnp4!{meccts,dayton,rosevax}!ems!A60!lee
> Sperry Corporation ATT: (612) 635-6334
There are two possiblilities:
Use something like kill(pid,SIGSTOP) to suspend the process
and use kill(pid,SIGCONT) to resume. Note: These signals
cannot be blocked, so this is a safe way to suspend a
process.
Setup a handler which suspends the process upon receiving a
specific signal, and which wakes up when it receives another
signal. (see man pages for sigpause(2), signal(2)).
Of course a process can suspend itself at any time it wants to:
just call sleep(3) or usleep(3)...
Juergen Wagner, (USENET) ...!unido!iaoobel!wagner
Fraunhofer Institute IAO, Stuttgart
More information about the Comp.unix.questions
mailing list