logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

TCSBRK, TCSBRKP, TIOCSBRK, TIOCCBRK - sending a break

Description

TCSBRK Equivalent to tcsendbreak(fd,arg). If the terminal is using asynchronous serial data transmission, and arg is zero, then send a break (a stream of zero bits) for between 0.25 and 0.5 seconds. If the terminal is not using asynchronous serial data transmission, then either a break is sent, or the function returns without doing anything. When arg is nonzero, nobody knows what will happen. (SVr4, UnixWare, Solaris, and Linux treat tcsendbreak(fd,arg) with nonzero arg like tcdrain(fd). SunOS treats arg as a multiplier, and sends a stream of bits arg times as long as done for zero arg. DG/UX and AIX treat arg (when nonzero) as a time interval measured in milliseconds. HP-UX ignores arg.) TCSBRKP So-called "POSIX version" of TCSBRK. It treats nonzero arg as a time interval measured in deciseconds, and does nothing when the driver does not support breaks. TIOCSBRK Turn break on, that is, start sending zero bits. TIOCCBRK Turn break off, that is, stop sending zero bits.

Library

Standard C library (libc, -lc)

Name

TCSBRK, TCSBRKP, TIOCSBRK, TIOCCBRK - sending a break

Return Value

On success, 0 is returned. On error, -1 is returned, and errno is set to indicate the error.

See Also

ioctl(2), ioctl_tty(2) Linux man-pages 6.9.1 2024-06-13 TCSBRK(2const)

Synopsis

#include<asm/termbits.h> /* Definition of T*BRK* constants */ #include<sys/ioctl.h>intioctl(intfd,TCSBRK,intarg);intioctl(intfd,TCSBRKP,intarg);intioctl(intfd,TIOCSBRK);intioctl(intfd,TIOCCBRK);

See Also