1TCFLUSH(3P)                POSIX Programmer's Manual               TCFLUSH(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       tcflush — flush non-transmitted output data, non-read  input  data,  or
14       both
15

SYNOPSIS

17       #include <termios.h>
18
19       int tcflush(int fildes, int queue_selector);
20

DESCRIPTION

22       Upon successful completion, tcflush() shall discard data written to the
23       object referred to by fildes (an open file descriptor associated with a
24       terminal) but not transmitted, or data received but not read, depending
25       on the value of queue_selector:
26
27        *  If queue_selector is TCIFLUSH, it shall flush data received but not
28           read.
29
30        *  If  queue_selector is TCOFLUSH, it shall flush data written but not
31           transmitted.
32
33        *  If queue_selector is TCIOFLUSH, it shall flush both  data  received
34           but not read and data written but not transmitted.
35
36       Attempts  to  use tcflush() from a process which is a member of a back‐
37       ground process group on a fildes associated with its controlling termi‐
38       nal  shall cause the process group to be sent a SIGTTOU signal.  If the
39       calling thread is blocking SIGTTOU signals or the process  is  ignoring
40       SIGTTOU signals, the process shall be allowed to perform the operation,
41       and no signal is sent.
42

RETURN VALUE

44       Upon successful completion, 0 shall be returned. Otherwise, −1 shall be
45       returned and errno set to indicate the error.
46

ERRORS

48       The tcflush() function shall fail if:
49
50       EBADF  The fildes argument is not a valid file descriptor.
51
52       EINVAL The queue_selector argument is not a supported value.
53
54       EIO    The  process group of the writing process is orphaned, the call‐
55              ing thread is not blocking  SIGTTOU,  and  the  process  is  not
56              ignoring SIGTTOU.
57
58       ENOTTY The file associated with fildes is not a terminal.
59
60       The following sections are informative.
61

EXAMPLES

63       None.
64

APPLICATION USAGE

66       None.
67

RATIONALE

69       None.
70

FUTURE DIRECTIONS

72       None.
73

SEE ALSO

75       tcdrain()
76
77       The Base Definitions volume of POSIX.1‐2008, Chapter 11, General Termi‐
78       nal Interface, <termios.h>
79
81       Portions of this text are reprinted and reproduced in  electronic  form
82       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
83       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
84       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
85       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
86       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) In the
87       event of any discrepancy between this version and the original IEEE and
88       The  Open Group Standard, the original IEEE and The Open Group Standard
89       is the referee document. The original Standard can be  obtained  online
90       at http://www.unix.org/online.html .
91
92       Any  typographical  or  formatting  errors that appear in this page are
93       most likely to have been introduced during the conversion of the source
94       files  to  man page format. To report such errors, see https://www.ker
95       nel.org/doc/man-pages/reporting_bugs.html .
96
97
98
99IEEE/The Open Group                  2013                          TCFLUSH(3P)
Impressum