1explain_waitpid_or_die(3)  Library Functions Manual  explain_waitpid_or_die(3)
2
3
4

NAME

6       explain_waitpid_or_die  -  wait  for process to change state and report
7       errors
8

SYNOPSIS

10       #include <libexplain/waitpid.h>
11       int pid = explain_waitpid_or_die(int pid, int *status, int options);
12

DESCRIPTION

14       The explain_waitpid_or_die function is used to call the waitpid(2) sys‐
15       tem  call.   On  failure  an  explanation  will  be  printed to stderr,
16       obtained from explain_waitpid(3), and then the  process  terminates  by
17       calling exit(EXIT_FAILURE).
18
19       This  function  is intended to be used in a fashion similar to the fol‐
20       lowing example:
21              explain_waitpid_or_die(pid, status, options);
22
23       pid     The pid, exactly as to be passed to the waitpid(2) system call.
24
25       status  The status, exactly as to be passed to  the  waitpid(2)  system
26               call.
27
28       options The  options,  exactly as to be passed to the waitpid(2) system
29               call.
30
31       Returns:
32               This function only returns on success.  On failure,  prints  an
33               explanation and exits.
34

SEE ALSO

36       waitpid(2)
37               wait for process to change state
38
39       explain_waitpid(3)
40               explain waitpid(2) errors
41
42       exit(2) terminate the calling process
43
45       libexplain version 1.4
46       Copyright (C) 2008 Peter Miller
47
48
49
50                                                     explain_waitpid_or_die(3)
Impressum