Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!uakari.primate.wisc.edu!ark1!nems!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.unix.wizards Subject: Re: waitpid() ??? Message-ID: <26002@mimsy.umd.edu> Date: 13 Aug 90 00:48:03 GMT References: Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 22 In article mitch@hq.af.mil (Mitch Wright) writes: >Does anyone have an idea exactly what [waitpid()] does? waitpid() is a POSIX function: int waitpid(int pid, int *status, int options) where the `pid' argument is the process ID of the process to wait for, or WAIT_ANY to wait for any child; `status' is the place to store the exit status (or signal); and `options' are options from the same set allowed by 4.[123]BSD wait3(): WNOHANG: return 0 if there are no exited children at the moment; and WUNTRACED: return information on stopped children even when they are not being traced via ptrace(). waitpid() allows routines like pclose() to operate reliably (i.e., without consuming any `wrong' child status). -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris (New campus phone system, active sometime soon: +1 301 405 2750)