TIOCEXCL, TIOCGEXCL, TIOCNXCL - exclusive mode
Contents
Description
TIOCEXCL
Put the terminal into exclusive mode. No further open(2) operations on the terminal are
permitted. (They fail with EBUSY, except for a process with the CAP_SYS_ADMIN capability.)
TIOCGEXCL
If the terminal is currently in exclusive mode, place a nonzero value in the location pointed to
by argp; otherwise, place zero in *argp.
TIOCNXCL
Disable exclusive mode.
History
TIOCGEXCL
Linux 3.8.
Library
Standard C library (libc, -lc)
Name
TIOCEXCL, TIOCGEXCL, TIOCNXCL - exclusive mode
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 TIOCEXCL(2const)
Synopsis
#include<asm/termbits.h> /* Definition of TIOC*XCL constants */
#include<sys/ioctl.h>intioctl(intfd,TIOCEXCL);intioctl(intfd,TIOCGEXCL,int*argp);intioctl(intfd,TIOCNXCL);