logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

tcflush.3p (3270B)


  1. '\" et
  2. .TH TCFLUSH "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. tcflush
  12. \(em flush non-transmitted output data, non-read input data, or both
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <termios.h>
  17. .P
  18. int tcflush(int \fIfildes\fP, int \fIqueue_selector\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. Upon successful completion,
  22. \fItcflush\fR()
  23. shall discard data written to the object referred to by
  24. .IR fildes
  25. (an open file descriptor associated with a terminal) but not
  26. transmitted, or data received but not read, depending on the value of
  27. .IR queue_selector :
  28. .IP " *" 4
  29. If
  30. .IR queue_selector
  31. is TCIFLUSH, it shall flush data received but not read.
  32. .IP " *" 4
  33. If
  34. .IR queue_selector
  35. is TCOFLUSH, it shall flush data written but not transmitted.
  36. .IP " *" 4
  37. If
  38. .IR queue_selector
  39. is TCIOFLUSH, it shall flush both data received but not read and data
  40. written but not transmitted.
  41. .P
  42. Attempts to use
  43. \fItcflush\fR()
  44. from a process which is a member of a background process group on a
  45. .IR fildes
  46. associated with its controlling terminal shall cause the process group
  47. to be sent a SIGTTOU signal.
  48. If the calling thread is blocking SIGTTOU signals or the process is
  49. ignoring SIGTTOU signals, the process shall be allowed to perform the
  50. operation, and no signal is sent.
  51. .SH "RETURN VALUE"
  52. Upon successful completion, 0 shall be returned. Otherwise, \-1
  53. shall be returned and
  54. .IR errno
  55. set to indicate the error.
  56. .SH ERRORS
  57. The
  58. \fItcflush\fR()
  59. function shall fail if:
  60. .TP
  61. .BR EBADF
  62. The
  63. .IR fildes
  64. argument is not a valid file descriptor.
  65. .TP
  66. .BR EINVAL
  67. The
  68. .IR queue_selector
  69. argument is not a supported value.
  70. .TP
  71. .BR EIO
  72. The process group of the writing process is orphaned, the calling thread
  73. is not blocking SIGTTOU, and the process is not ignoring SIGTTOU.
  74. .TP
  75. .BR ENOTTY
  76. The file associated with
  77. .IR fildes
  78. is not a terminal.
  79. .LP
  80. .IR "The following sections are informative."
  81. .SH EXAMPLES
  82. None.
  83. .SH "APPLICATION USAGE"
  84. None.
  85. .SH RATIONALE
  86. None.
  87. .SH "FUTURE DIRECTIONS"
  88. None.
  89. .SH "SEE ALSO"
  90. .IR "\fItcdrain\fR\^(\|)"
  91. .P
  92. The Base Definitions volume of POSIX.1\(hy2017,
  93. .IR "Chapter 11" ", " "General Terminal Interface",
  94. .IR "\fB<termios.h>\fP"
  95. .\"
  96. .SH COPYRIGHT
  97. Portions of this text are reprinted and reproduced in electronic form
  98. from IEEE Std 1003.1-2017, Standard for Information Technology
  99. -- Portable Operating System Interface (POSIX), The Open Group Base
  100. Specifications Issue 7, 2018 Edition,
  101. Copyright (C) 2018 by the Institute of
  102. Electrical and Electronics Engineers, Inc and The Open Group.
  103. In the event of any discrepancy between this version and the original IEEE and
  104. The Open Group Standard, the original IEEE and The Open Group Standard
  105. is the referee document. The original Standard can be obtained online at
  106. http://www.opengroup.org/unix/online.html .
  107. .PP
  108. Any typographical or formatting errors that appear
  109. in this page are most likely
  110. to have been introduced during the conversion of the source files to
  111. man page format. To report such errors, see
  112. https://www.kernel.org/doc/man-pages/reporting_bugs.html .