1explain_setlinebuf_or_die(3)Library Functions Manualexplain_setlinebuf_or_die(3)
2
3
4

NAME

6       explain_setlinebuf_or_die  -  stream  buffering  operations  and report
7       errors
8

SYNOPSIS

10       #include <libexplain/setlinebuf.h>
11       void explain_setlinebuf_or_die(FILE *fp);
12       void explain_setlinebuf_on_error(FILE *fp);
13

DESCRIPTION

15       The  explain_setlinebuf_or_die  function  is  used  to  call  the  set‐
16       linebuf(3)  system  call.  On failure an explanation will be printed to
17       stderr, obtained from the explain_setlinebuf(3) function, and then  the
18       process terminates by calling exit(EXIT_FAILURE).
19
20       The  explain_setlinebuf_on_error  function  is  used  to  call the set‐
21       linebuf(3) system call. On failure an explanation will  be  printed  to
22       stderr,  obtained  from  the  explain_setlinebuf(3) function, but still
23       returns to the caller.
24
25       fp      The fp, exactly as to be passed  to  the  setlinebuf(3)  system
26               call.
27

RETURN VALUE

29       The  explain_setlinebuf_or_die  function  only  returns on success, see
30       setlinebuf(3) for more information. On failure, prints  an  explanation
31       and exits, it does not return.
32
33       The  explain_setlinebuf_on_error  function  always  returns  the  value
34       return by the wrapped setlinebuf(3) system call.
35

EXAMPLE

37       The explain_setlinebuf_or_die function is intended  to  be  used  in  a
38       fashion similar to the following example:
39              explain_setlinebuf_or_die(fp);
40

SEE ALSO

42       setlinebuf(3)
43               stream buffering operations
44
45       explain_setlinebuf(3)
46               explain setlinebuf(3) errors
47
48       exit(2) terminate the calling process
49
51       libexplain version 1.4
52       Copyright (C) 2010 Peter Miller
53
54
55
56                                                  explain_setlinebuf_or_die(3)
Impressum