On Wed, Nov 08, 2000 at 09:52:07AM +0100, Raphael Quinet wrote:
> Included below is a small test program that checks how the OS behaves
> when a child process exits while the parent is blocking on waitpid()
> and has a SIGCHLD handler installed (which also calls waitpid, and
> thus could steal the status if the signal handler is called before
> the first waitpid returns).
ignatios@theory 14 % ./waittest.sol2.6.gcc
installing signal handler...
forking...
waiting for child 419 to exit...
child 419 has exited
sig_pid = 419
sig_status = 25600
main_pid = -1
main_status = 9999
sigchld handler was called before waitpid (no status)
Oops, you knew this already, I guess.
SunOS4.1.4 with cc deosn't compile it at all.
with gcc:
waittest.c:28: `SA_RESTART' undeclared (first use this function)
and I have to read manuals to find out what to do about it.
-is
--
* Progress (n.): The process through which Usenet has evolved from
smart people in front of dumb terminals to dumb people in front of
smart terminals. -- [EMAIL PROTECTED] (obscurity)
PGP signature