TCFLOW(3POSIX)
β¨ TCFLOW(3POSIX) β¨
okay bestie, welcome to the POSIX Programmer's Manual π this one's about tcflow and it's lowkey a whole vibe. sit down, grab a strawberry π, let's get into it.
πΈ PROLOG πΈ
okay so first things first, real talk: this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ (so like, go consult the corresponding Linux manual page for the deets on Linux behavior), or honestly the interface may not even be implemented on Linux at all. not me warning you before we even start π
π NAME π
tcflow β suspend or restart the transmission or reception of data. she does exactly what it says on the tin, no cap π
π SYNOPSIS π
#include <termios.h>
int tcflow(int fildes, int action);
π¦ DESCRIPTION π¦
so the tcflow() function shall suspend or restart transmission or reception of data on the object referred to by fildes, and what actually happens depends on the value of action. the fildes argument is an open file descriptor associated with a terminal. periodt.
here's the rundown, one action at a time:
- if
actionisTCOOFF, output shall be suspended. π - if
actionisTCOON, suspended output shall be restarted. βΆοΈ - if
actionisTCIOFFandfildesrefers to a terminal device, the system shall transmit aSTOPcharacter, which is intended to cause the terminal device to stop transmitting data to the system. but iffildesis associated with a pseudo-terminal, theSTOPcharacter need not be transmitted. iykyk. - if
actionisTCIONandfildesrefers to a terminal device, the system shall transmit aSTARTcharacter, which is intended to cause the terminal device to start transmitting data to the system. and iffildesis associated with a pseudo-terminal, theSTARTcharacter need not be transmitted.
ngl the default on the opening of a terminal file is that neither its input nor its output are suspended. so fresh terminal, fresh vibes β¨
π¨ okay this part is important bestie. attempts to usetcflow()from a process which is a member of a background process group on afildesassociated with its controlling terminal shall cause the process group to be sent aSIGTTOUsignal. BUT if the calling thread is blockingSIGTTOUsignals or the process is ignoringSIGTTOUsignals, the process shall be allowed to perform the operation, and no signal is sent. so like, you're fine either way, just know the rules π
π RETURN VALUE π
upon successful completion, 0 shall be returned. otherwise, -1 shall be returned and errno set to indicate the error. classic.
π ERRORS π
the tcflow() function shall fail if any of these pop up:
EBADFβ thefildesargument is not a valid file descriptor. not a real one, girl πEINVALβ theactionargument is not a supported value. we don't know her.EIOβ the process group of the writing process is orphaned, the calling thread is not blockingSIGTTOU, and the process is not ignoringSIGTTOU. rough out here fr fr.ENOTTYβ the file associated withfildesis not a terminal. wrong address, bestie π
the following sections are informative.
π§ EXAMPLES π§
None.
π APPLICATION USAGE π
None.
β RATIONALE β
None.
πΈ FUTURE DIRECTIONS πΈ
None.
π«Ά SEE ALSO π«Ά
tcsendbreak()- the Base Definitions volume of POSIX.1β2017, Chapter 11, General Terminal Interface,
<termios.h>
π COPYRIGHT π
portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. in the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. the original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. to report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page, bestie!! π this was IEEE/The Open Group, 2017, and the page is TCFLOW(3POSIX). thanks for reading, you ate that πβ¨π¦
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms