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

tcdrain.3p (2818B)


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