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/tcdropline.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/tcdropline.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/tcdropline.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/tcdropline.html on line 8

tcdropline()

Disconnect a communications line

Synopsis:

#include <termios.h>

int tcdropline( int fd, 
                int duration );

Arguments:

fd
A file descriptor that's associated with the line that you want to disconnect.
duration
The number of milliseconds that you want to drop the line for.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The tcdropline() function initiates a disconnect condition on the communication line associated with the opened file descriptor indicated by fd.

The disconnect condition lasts at least duration milliseconds, or approximately 300 milliseconds if duration is zero. The system rounds the effective value of duration up to the next highest supported interval, which is typically a multiple of 100 milliseconds.

Returns:

0
Success.
-1
An error occurred (errno is set).

Errors:

EBADF
Invalid fd argument.
ENOSYS
The resource manager associated with fd doesn't support this call.
ENOTTY
The argument fd doesn't refer to a terminal device.

Examples:

#include <termios.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>

int main( void )
  {
    int fd;

    fd = open( "/dev/ser1", O_RDWR );

    /* Disconnect for 500 milliseconds */
    tcdropline( fd, 500 );

    close( fd );
    return EXIT_SUCCESS;
  }

Classification:

QNX 4

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

tcdrain(), tcflow(), tcflush()


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/tcdropline.html on line 176

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/tcdropline.html on line 176