Advanced Programming in the UNIX Environment: Second Edition [Electronic resources]

W. Richard Stevens; Stephen A. Rago

نسخه متنی -صفحه : 369/ 142
نمايش فراداده

8.7. waitid Function

[View full width]

#include <sys/wait.h> int waitid(idtype_t

idtype , id_t

id , siginfo_t *

infop , int

options );

Returns: 0 if OK, 1 on error

Like waitpid, waitid allows a process to specify which children to wait for. Instead of encoding this information in a single argument combined with the process ID or process group ID, two separate arguments are used. The

id parameter is interpreted based on the value of

idtype . The types supported are summarized in Section 10.14.

Of the four platforms covered in this book, only Solaris provides support for waitid.