logo
Free, Micro AI Code Reviews That Run on Git Commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt

ioctl_tty - ioctls for terminals and serial lines

Description

The ioctl(2) call for terminals and serial ports accepts many possible operation arguments. Most require a third argument, of varying type, here called argp or arg. Use of ioctl() makes for nonportable programs. Use the POSIX interface described in termios(3) whenever possible. GetandsetterminalattributesTCGETS(2const) TCSETS(2const) TCSETSW(2const) TCSETSF(2const) TCGETS(2const) TCSETS(2const) TCSETSW(2const) TCSETSF(2const) TCGETS(2const) TCSETS(2const) TCSETSW(2const) TCSETSF(2const) LockingthetermiosstructureTIOCGLCKTRMIOS(2const) TIOCSLCKTRMIOS(2const) GetandsetwindowsizeTIOCGWINSZ(2const) TIOCSWINSZ(2const) SendingabreakTCSBRK(2const) TCSBRKP(2const) TIOCSBRK(2const) TIOCCBRK(2const) SoftwareflowcontrolTCXONC(2const) BuffercountandflushingFIONREAD(2const) TIOCINQ(2const) TIOCOUTQ(2const) TCFLSH(2const) TIOCSERGETLSR(2const) FakinginputTIOCSTI(2const) RedirectingconsoleoutputTIOCCONS(2const) ControllingterminalTIOCSCTTY(2const) TIOCNOTTY(2const) ProcessgroupandsessionIDTIOCGPGRP(2const) TIOCSPGRP(2const) TIOCGSID(2const) ExclusivemodeTIOCEXCL(2const) TIOCGEXCL(2const) TIOCNXCL(2const) LinedisciplineTIOCGETD(2const) TIOCSETD(2const) PseudoterminalioctlsTIOCPKT(2const) TIOCGPKT(2const) TIOCSPTLCK(2const) TIOCGPTLCK(2const) TIOCGPTPEER(2const) ModemcontrolTIOCMGET(2const) TIOCMSET(2const) TIOCMBIC(2const) TIOCMBIS(2const) TIOCMIWAIT(2const) TIOCGICOUNT(2const) MarkingalineaslocalTIOCGSOFTCAR(2const) TIOCSSOFTCAR(2const) Linux-specific For the TIOCLINUX(2const) ioctl, see ioctl_console(2). KerneldebuggingTIOCTTYGSTRUCT(2const)

Library

Standard C library (libc, -lc)

Name

ioctl_tty - ioctls for terminals and serial lines

Return Value

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

See Also

ioctl(2), ldattach(8), ioctl_console(2), termios(3), pty(7) Linux man-pages 6.9.1 2024-06-14 ioctl_tty(2)

Synopsis

#include<asm/termbits.h> /* Definition of constants */ #include<sys/ioctl.h>intioctl(intfd,intop,...);

See Also