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, 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 timeinterval measured in milliseconds. HP-UX ignores arg.)
"TCSBRKP int "
So-called "POSIX version" of TCSBRK. It treats nonzero arg as a timeinterval measured in deciseconds, and does nothing when the driver does not support breaks.
Redirect output that would have gone to /dev/console or /dev/tty0 to the given tty. If that was a pty master, send it to the slave. Anybody can do this as long as the output was not redirected yet. If it was redirected already EBUSY is returned, but root may stop redirection by using this ioctl with fd pointing at /dev/console or /dev/tty0.
Make the given tty the controlling tty of the current process. The current process must be a session leader and not have a controlling tty already. If this tty is already the controlling tty of a different session group then the ioctl fails with EPERM, unless the caller is root and arg equals 1, in which case the tty is stolen, and all processes that had it as controlling tty lose it.
TIOCNOTTYvoid
If the given tty was the controlling tty of the current process, give up this controlling tty. If the process was session leader, then send SIGHUP and SIGCONT to the foreground process group and all processes in the current session lose their controlling tty.
Enable (when *argp is nonzero) or disable packet mode. Can be applied to the master side of a pseudotty only (and will return ENOTTY otherwise). In packet mode, each subsequent read(2) will return a packet that either contains a single nonzero control byte, or has a single zero byte followed by data written on the slave side of the pty. If the first byte is not TIOCPKT_DATA (0), it is an OR of one or more of the following bits:
TIOCPKT_FLUSHREAD The read queue for the terminal is flushed.
TIOCPKT_FLUSHWRITE The write queue for the terminal is flushed.
TIOCPKT_STOP Output to the terminal is stopped.
TIOCPKT_START Output to the terminal is restarted.
TIOCPKT_DOSTOP t_stopc is ^S and t_startc is ^Q.
TIOCPKT_NOSTOP the start and stop characters are not ^S/^Q.
While this mode is in use, the presence of control status information to be read from the master side may be detected by a select(2) for exceptional conditions.
This mode is used by rlogin(1) and rlogind(8) to implement a remote-echoed, locally ^S/^Q flow-controlled remote login.
The BSD ioctls TIOCSTOP, TIOCSTART, TIOCUCNTL, TIOCREMOTE have not been implemented under Linux.
("Get software carrier flag") Get the status of the CLOCAL flag in the c_cflag field of the termios structure.
"TIOCSSOFTCAR const int *"
("Set software carrier flag") Set the CLOCAL flag in the termios structure when *argp is nonzero, and clear it otherwise.
If the CLOCAL flag for a line is off, the hardware carrier detect (DCD) signal is significant, and an open(2) of the corresponding tty will block until DCD is asserted, unless the O_NONBLOCK flag is given. If CLOCAL is set, the line behaves as if DCD is always asserted. The software carrier flag is usually turned on for local devices, and is off for lines with modems.