1explain_tcgetattr_or_die(3)Library Functions Manualexplain_tcgetattr_or_die(3)
2
3
4

NAME

6       explain_tcgetattr_or_die - get terminal parameters and report errors
7

SYNOPSIS

9       #include <libexplain/tcgetattr.h>
10       void explain_tcgetattr_or_die(int fildes, struct termios *data);
11       int explain_tcgetattr_on_error(int fildes, struct termios *data);
12

DESCRIPTION

14       The  explain_tcgetattr_or_die function is used to call the tcgetattr(3)
15       system call. On failure an  explanation  will  be  printed  to  stderr,
16       obtained  from  the explain_tcgetattr(3) function, and then the process
17       terminates by calling exit(EXIT_FAILURE).
18
19       The explain_tcgetattr_on_error function  is  used  to  call  the  tcge‐
20       tattr(3)  system  call.  On  failure  an explanation will be printed to
21       stderr, obtained from  the  explain_tcgetattr(3)  function,  but  still
22       returns to the caller.
23
24       fildes  The  fildes, exactly as to be passed to the tcgetattr(3) system
25               call.
26
27       data    The data, exactly as to be passed to  the  tcgetattr(3)  system
28               call.
29

RETURN VALUE

31       The  explain_tcgetattr_or_die  function  only  returns  on success, see
32       tcgetattr(3) for more information. On failure,  prints  an  explanation
33       and exits, it does not return.
34
35       The explain_tcgetattr_on_error function always returns the value return
36       by the wrapped tcgetattr(3) system call.
37

EXAMPLE

39       The explain_tcgetattr_or_die function is intended to be used in a fash‐
40       ion similar to the following example:
41              explain_tcgetattr_or_die(fildes, data);
42

SEE ALSO

44       tcgetattr(3)
45               get terminal parameters
46
47       explain_tcgetattr(3)
48               explain tcgetattr(3) errors
49
50       exit(2) terminate the calling process
51
53       libexplain version 0.40
54       Copyright (C) 2009 Peter Miller
55
56
57
58                                                   explain_tcgetattr_or_die(3)
Impressum