TIOCGLCKTRMIOS(2const)

TIOCGLCKTRMIOS2const

Locking the termios structre

Part of TIOCSLCKTRMIOS(2const).

Usage

#include <asm/termbits.h>  /* Definition of TIOC*CLKTRMIOS constants */
#include <sys/ioctl.h>

int ioctl(int fd, TIOCGLCKTRMIOS, struct termios *argp); int ioctl(int fd, TIOCSLCKTRMIOS, const struct termios *argp);

#include <asm/termbits.h>

struct termios;

Library

Standard C library (libc, -lc)

Overview

The termios structure of a terminal can be locked. The lock is itself a termios structure, with nonzero bits or fields indicating a locked value.

TIOCGLCKTRMIOS

Gets the locking status of the termios structure of the terminal.

TIOCSLCKTRMIOS

Sets the locking status of the termios structure of the terminal. Only a process with the CAP_SYS_ADMIN capability can do this.

Return value

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

Errors

EPERM

Insufficient permission.

Caveats

Please note that struct termios from <asm/termbits.h> is different and incompatible with struct termios from <termios.h>. These ioctl calls require struct termios from <asm/termbits.h>.

Releases

2 releases since Debian 13 (Trixie); the text changed 1 time.

  1. 13
  2. Arch

From man-pages 6.19-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.