COHERENT manpages

This page displays the COHERENT manpage for tcsendbreak() [Send a break to a terminal].

List of available manpages
Index


tcsendbreak() -- termios Macro (termios.h)

Send a break to a terminal
#include <termios.h>
int tcsendbreak(fd, duration)
int fd;
int duration;

The termios  macro tcsendbreak() transmits  NUL characters to  the terminal
device described by file descriptor fd.

duration gives the length of  time to transmit NUL characters.  If duration
is zero, tcsnedbreak() transmits zero-valued bits for at least 0.25 seconds
and  no  more  than  0.5  seconds.    If  duration  is  not  set  to  zero,
tcsendbreak()  sends  zero-valued  bits  for  the  time  specified  by  the
implementation.   Under  COHERENT,  tcsendbreak()  is  a macro  defined  as
follows:

    #define tcsendbreak(filedes,duration) ioctl(filedes,TCSBRK,0)

TCSBRK  is defined  in  header file  <termio.h>:  it transmits  break
characters for 0.25 seconds.  Thus, the argument duration is ignored.

If   fd  does   not  use   asynchronous   serial  data   transmission,  the
implementation  defines whether  the tcsendbreak()  function sends  data to
generate a  break condition (as  defined by the  implementation) or returns
without taking any action.  Under COHERENT, it does nothing.

If all goes well, tcsendbreak()  returns zero.  If something goes wrong, it
returns -1 and sets errno to an appropriate value, as follows:

EBADF
     fd is not a valid file descriptor.

ENOTTY
     fd does not describe a terminal.

See Also

termios
POSIX Standard, §7.2.2