TIOCSTI(2const)

TIOCSTI2const

Faking input

Usage

#include <asm/termbits.h>  /* Definition of TIOCSTI */
#include <sys/ioctl.h>

int ioctl(int fd, TIOCSTI, const char *argp);

Library

Standard C library (libc, -lc)

Overview

Insert the given byte in the input queue.

Since Linux 6.2, this operation may require the CAP_SYS_ADMIN capability (if the dev.tty.legacy_tiocsti sysctl variable is set to false).

Return value

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

Errors

EPERM

Insufficient permission.

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.