1tcflow(3C) Standard C Library Functions tcflow(3C)
2
3
4
6 tcflow - suspend or restart the transmission or reception of data
7
9 #include <termios.h>
10
11 int tcflow(int fildes, int action);
12
13
15 The tcflow() function suspends transmission or reception of data on the
16 object referred to by fildes, depending on the value of action. The
17 fildes argument is an open file descriptor associated with a terminal.
18
19 o If action is TCOOFF, output is suspended.
20
21 o If action is TCOON, suspended output is restarted.
22
23 o If action is TCIOFF, the system transmits a STOP character,
24 which is intended to cause the terminal device to stop
25 transmitting data to the system.
26
27 o If action is TCION, the system transmits a START character,
28 which is intended to cause the terminal device to start
29 transmitting data to the system.
30
31
32 The default on the opening of a terminal file is that neither its input
33 nor its output are suspended.
34
35
36 Attempts to use tcflow() from a process which is a member of a back‐
37 ground process group on a fildes associated with its controlling termi‐
38 nal, will cause the process group to be sent a SIGTTOU signal. If the
39 calling process is blocking or ignoring SIGTTOU signals, the process is
40 allowed to perform the operation, and no signal is sent.
41
43 Upon successful completion, 0 is returned. Otherwise, −1 is returned
44 and errno is set to indicate the error.
45
47 The tcflow() function will fail if:
48
49 EBADF The fildes argument is not a valid file descriptor.
50
51
52 EINVAL The action argument is not a supported value.
53
54
55 ENOTTY The file associated with fildes is not a terminal.
56
57
58
59 The tcflow() function may fail if:
60
61 EIO The process group of the writing process is orphaned, and the
62 writing process is not ignoring or blocking SIGTTOU.
63
64
66 See attributes(5) for descriptions of the following attributes:
67
68
69
70
71 ┌─────────────────────────────┬───────────────────────────────┐
72 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
73 ├─────────────────────────────┼───────────────────────────────┤
74 │Interface Stability │Standard │
75 ├─────────────────────────────┼───────────────────────────────┤
76 │MT-Level │MT-Safe, and Async-Signal-Safe │
77 └─────────────────────────────┴───────────────────────────────┘
78
80 tcsendbreak(3C), attributes(5), standards(5), termio(7I)
81
82
83
84SunOS 5.11 14 Aug 2002 tcflow(3C)