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

NAME

6       explain_close_or_die - close a file descriptor and report errors
7

SYNOPSIS

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

DESCRIPTION

13       The  explain_close_or_die  function is used to call the close(2) system
14       call.  On failure an explanation will be printed  to  stderr,  obtained
15       from  explain_close(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_close_or_die(fildes);
21
22       fildes  The  fildes,  exactly  as  to  be passed to the close(2) system
23               call.
24
25       Returns:
26               This function only returns on success.  On failure,  prints  an
27               explanation and exits.
28

SEE ALSO

30       close(2)
31               close a file descriptor
32
33       explain_close(3)
34               explain close(2) errors
35
36       exit(2) terminate the calling process
37
39       libexplain version 0.40
40       Copyright (C) 2008 Peter Miller
41
42
43
44                                                       explain_close_or_die(3)
Impressum