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

NAME

6       explain_dup_or_die - duplicate a file descriptor and report errors
7

SYNOPSIS

9       #include <libexplain/dup.h>
10       void explain_dup_or_die(int fildes);
11

DESCRIPTION

13       The explain_dup_or_die function is used to call the dup(2) system call.
14       On failure an explanation will be  printed  to  stderr,  obtained  from
15       explain_dup(3),   and   then   the   process   terminates   by  calling
16       exit(EXIT_FAILURE).
17
18       This function is intended to be used in a fashion similar to  the  fol‐
19       lowing example:
20              explain_dup_or_die(fildes);
21
22       fildes  The fildes, exactly as to be passed to the dup(2) system call.
23
24       Returns:
25               This  function  only returns on success.  On failure, prints an
26               explanation and exits.
27

SEE ALSO

29       dup(2)  duplicate a file descriptor
30
31       explain_dup(3)
32               explain dup(2) errors
33
34       exit(2) terminate the calling process
35
37       libexplain version 0.40
38       Copyright (C) 2008 Peter Miller
39
40
41
42                                                         explain_dup_or_die(3)
Impressum