Suspending processes - (nf)

kimcm at olamb.UUCP kimcm at olamb.UUCP
Mon Jan 19 22:33:26 AEST 1987


In article <8200002 at iaoobelix.UUCP>, wagner at iaoobelix.UUCP writes:
> There are two possiblilities:


	If you're using a BSD system:

> 	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.

	Or if you're running under BSD || SYSV:

> 	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)).

	In case of SYSV, see man pages alarm(2), pause(2) and signal(2)
	instead.


> Of course a process can suspend itself at any time it wants to:
> just call sleep(3) or usleep(3)...


						Kim Chr. Madsen



More information about the Comp.unix.questions mailing list