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

NAME

6       explain_tcdrain_or_die - Execute tcdrain(3) and report errors
7

SYNOPSIS

9       #include <libexplain/tcdrain.h>
10       void explain_tcdrain_or_die(int fildes);
11       int explain_tcdrain_on_error(int fildes);
12

DESCRIPTION

14       The explain_tcdrain_or_die function is used to call the tcdrain(3) sys‐
15       tem call. On failure an explanation will be printed to stderr, obtained
16       from  the  explain_tcdrain(3) function, and then the process terminates
17       by calling exit(EXIT_FAILURE).
18
19       The explain_tcdrain_on_error function is used to  call  the  tcdrain(3)
20       system  call.  On  failure  an  explanation  will be printed to stderr,
21       obtained from the explain_tcdrain(3) function, but still returns to the
22       caller.
23
24       fildes  The  fildes,  exactly  as to be passed to the tcdrain(3) system
25               call.
26

RETURN VALUE

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

EXAMPLE

36       The explain_tcdrain_or_die function is intended to be used in a fashion
37       similar to the following example:
38              explain_tcdrain_or_die(fildes);
39

SEE ALSO

41       tcdrain(3)
42               Execute tcdrain(3)
43
44       explain_tcdrain(3)
45               explain tcdrain(3) errors
46
47       exit(2) terminate the calling process
48
50       libexplain version 1.4
51       Copyright (C) 2009 Peter Miller,,,
52
53
54
55                                                     explain_tcdrain_or_die(3)
Impressum