Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!seismo!mcvax!diku!olamb!kimcm From: kimcm@olamb.UUCP Newsgroups: comp.unix.questions Subject: Re: Suspending processes - (nf) Message-ID: <192@olamb.UUCP> Date: Mon, 19-Jan-87 07:33:26 EST Article-I.D.: olamb.192 Posted: Mon Jan 19 07:33:26 1987 Date-Received: Sun, 1-Feb-87 16:02:58 EST References: <836@A60.UUCP> <8200002@iaoobelix.UUCP> Organization: AmbraSoft A/S (Denmark) Lines: 26 In article <8200002@iaoobelix.UUCP>, wagner@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