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

NAME

6       explain_fcntl_or_die - manipulate a file descriptor and report errors
7

SYNOPSIS

9       #include <libexplain/fcntl.h>
10       int explain_fcntl_or_die(int fildes, int command, long arg);
11

DESCRIPTION

13       The  explain_fcntl_or_die  function is used to call the fcntl(2) system
14       call.  On failure an explanation will be printed  to  stderr,  obtained
15       from  explain_fcntl(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              int result = explain_fcntl_or_die(fildes, command, arg);
21
22       fildes  The  fildes,  exactly  as  to  be passed to the fcntl(2) system
23               call.
24
25       command The command, exactly as to be passed  to  the  fcntl(2)  system
26               call.
27
28       arg     The arg, exactly as to be passed to the fcntl(2) system call.
29
30       Returns:
31               This  function only returns on success, and it returns whatever
32               was returned by the fcntl(2) call; depending  on  the  command,
33               this  may  have  no use.  On failure, prints an explanation and
34               exits, it does not return.
35

SEE ALSO

37       fcntl(2)
38               manipulate a file descriptor
39
40       explain_fcntl(3)
41               explain fcntl(2) errors
42
43       exit(2) terminate the calling process
44
46       libexplain version 0.40
47       Copyright (C) 2008 Peter Miller
48
49
50
51                                                       explain_fcntl_or_die(3)
Impressum