Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcflow.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcflow.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcflow.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcflow.html on line 8
Perform a flow-control operation on a data stream
#include <termios.h>
int tcflow( int fildes,
int action );
- fildes
- A file descriptor that's associated with the data stream that you want to
perform the operation on.
- action
- The action you want to perform; see below.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The tcflow() function performs a flow-control operation
on the data stream associated with fildes, depending on the
values in action.
At least the following actions are defined in <termios.h>:
- TCOOFF
- Use software flow control to suspend output on the device
associated with fildes.
- TCOOFFHW
- Use hardware flow control to suspend output on the device
associated with fildes.
- TCOON
- Use software flow control to resume output on the device
associated with fildes.
- TCOONHW
- Use hardware flow control to resume output on the device
associated with fildes.
- TCIOFF
- Cause input to be flow-controlled by sending a
STOP character immediately across the communication line associated
with fildes, (that is, software flow control).
- TCIOFFHW
- Cause input to be flow-controlled by using hardware control.
- TCION
- Resume input by sending a START
character immediately across the communication line associated with
fildes (that is, software flow control).
- TCIONHW
- Cause input to be resumed by using hardware
flow control.
- 0
- Success.
- -1
- An error occurred
(errno is set).
- EBADF
- Invalid fildes argument.
- EINVAL
- Invalid action argument.
- ENOSYS
- The resource manager associated with fildes doesn't support
this call.
- ENOTTY
- The argument fildes doesn't refer to a terminal device.
#include <termios.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
int main( void )
{
int fd;
fd = open( "/dev/ser1", O_RDWR );
/* Resume output on flow-controlled device */
tcflow( fd, TCOON );
close( fd );
return EXIT_SUCCESS;
}
POSIX 1003.1
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
tcdrain(),
tcflush(),
tcsendbreak()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcflow.html on line 238
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcflow.html on line 238