From: "Michael R. Kline" <mike () lib ! utexas ! edu>
To: tru64-unix-managers
Subject: trouble using wait3
Date: Tue, 19 Mar 1996 15:24:11 +0000 [thread overview]
Message-ID: <96076330121432.tru64-unix-managers.marc@archive.invalid> (raw)
Hello Gurus,
I tried searching the archive at Stanford for this but the search
utility is currently down, so if this has been covered before, please
forgive me.
I am writing code for a process that will fork and I tried the following
code for cleaning up zombie processes (found in Internetworking with
TCP/IP by Comer & Stevens):
#include <sys/types.h>
#include <sys/resource.h>
#include <sys/wait.h>
/*----------------------------------------------------------------------*/
/* reaper - clean up zombie children
*/
/*----------------------------------------------------------------------*/
int
reaper()
{
union wait status;
while (wait3(&status, WNOHANG, (struct rusage *)0) >= 0)
/* empty */;
}
when compiling this code I get the following error:
/usr/lib/cmplrs/cc/cfe: Error: TCPechod.c, line 100: storage size for
'status' isn't known
union wait status;
---------- ^
Now, if I add the union wait definition from <sys/wait.h> to my code it
compiles fine. What gives?????
Mike
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Michael R. Kline mike@lib.utexas.edu
General Libraries Office: (512) 495-4391
University of Texas at Austin FAX : (512) 495-4347
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
reply other threads:[~1996-03-19 15:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox