set_termios(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

set_termios(9) πŸ’…

okay bestie, welcome to the Kernel API Manual page for set_termios β€” this is the tty termios helper, and we’re gonna get you comfy with it ✨

🌸 NAME 🌸

set_termios β€” set termios values for a tty

✨ SYNOPSIS ✨

int set_termios (struct tty_struct *tty , void __user *arg , int opt );

πŸŽ€ ARGUMENTS πŸŽ€

here’s the little cast of arguments, no cap:

  • tty β€” terminal device
  • arg β€” user data
  • opt β€” option information

πŸ¦‹ DESCRIPTION πŸ¦‹

so set_termios is a helper function: it prepares the termios data and runs the necessary other functions before using tty_set_termios to do the actual changes πŸ‘‘

Locking note 🫢: the called functions take the tty_struct->ldisc_sem and tty_struct->termios_rwsem locks.

πŸ’– RETURN πŸ’–

0 on success, an error otherwise 😭

πŸ”₯ SEE ALSO πŸ”₯

kernel file: ./drivers/tty/tty_ioctl.c β€” and here’s the whole squad:

okay that’s the page, bestie β€” source/version: ./drivers/tty, dated October 2026 β€” bye and go set those termios values πŸ’…βœ¨

πŸ“¦ where this page comes from