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

NAME

6       explain_vfork_or_die - create a child process and report errors
7

SYNOPSIS

9       #include <libexplain/vfork.h>
10       pid_t explain_vfork_or_die(void);
11       pid_t explain_vfork_on_error(void);
12

DESCRIPTION

14       The  explain_vfork_or_die  function is used to call the vfork(2) system
15       call. On failure an explanation will be  printed  to  stderr,  obtained
16       from  the explain_vfork(3) function, and then the process terminates by
17       calling exit(EXIT_FAILURE).
18
19       The explain_vfork_on_error function is used to call the vfork(2) system
20       call.  On  failure  an  explanation will be printed to stderr, obtained
21       from the explain_vfork(3) function, but still returns to the caller.
22

RETURN VALUE

24       The explain_vfork_or_die function only returns on success, see vfork(2)
25       for  more  information. On failure, prints an explanation and exits, it
26       does not return.
27
28       The explain_vfork_on_error function always returns the value return  by
29       the wrapped vfork(2) system call.
30

EXAMPLE

32       The  explain_vfork_or_die  function is intended to be used in a fashion
33       similar to the following example:
34              pid_t result = explain_vfork_or_die();
35

SEE ALSO

37       vfork(2)
38               create a child process and block parent
39
40       explain_vfork(3)
41               explain vfork(2) errors
42
43       exit(2) terminate the calling process
44
46       libexplain version 1.4
47       Copyright (C) 2009 Peter Miller
48
49
50
51                                                       explain_vfork_or_die(3)
Impressum