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

TIOCGSOFTCAR, TIOCSSOFTCAR - marking a line as local

Description

TIOCGSOFTCAR ("Get software carrier flag") Get the status of the CLOCAL flag in the c_cflag field of the termios structure. TIOCSSOFTCAR ("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 terminal 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.

Library

Standard C library (libc, -lc)

Name

TIOCGSOFTCAR, TIOCSSOFTCAR - marking a line as local

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 TIOCSSOFTCAR(2const)

Synopsis

#include<asm/termbits.h> /* Definition of TIOC*SOFTCAR constants */ #include<sys/ioctl.h>intioctl(intfd,TIOCGSOFTCAR,int*argp);intioctl(intfd,TIOCSSOFTCAR,constint*argp);

See Also