$manlookup

ioctl_tty

(2)

ioctls for terminals and serial lines

System callsmanpages-dev 6.9.1-1
#include <asm/termbits.h> /* Definition of constants */ #include <sys/ioctl.h> int ioctl(int fd, int op, ...);

LIBRARY

Standard C library (libc, -lc)

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.

For the TIOCLINUX(2const) ioctl, see ioctl_console(2).

RETURN VALUE

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

See also