tty_set_termios(9)
π tty_set_termios π
okay bestie, so you've stumbled into the Kernel API Manual and this page is all about tty_set_termios β and honestly? it's giving "small function, big responsibility." let's get into it π«Ά
β¨ NAME β¨
tty_set_termios β update termios values. that's it, that's the whole vibe. it updates the termios values. slay π
πΈ SYNOPSIS πΈ
int tty_set_termios (struct tty_struct *tty , struct ktermios
*new_termios );
like, one function, two args, returns an int. clean. iconic. no notes β¨
π ARGUMENTS π
ttyβ the tty you're updating. the main character, fr fr πnew_termiosβ the desired new value. i.e. where you want the termios to end up after this whole glow-up π
π¦ DESCRIPTION π¦
so what does it actually do? it performs updates to the termios values set on this tty. lowkey straightforward, highkey important π
β οΈ okay but listen β a master pty's termios should never be set. like, never ever. not a vibe check you want to fail, bestie. π«
Locking: tty_struct->termios_rwsem β yes she locks, and yes you should care. read the locking note before you go touching stuff π
π₯ SEE ALSO π₯
the kernel file lives at ./drivers/tty/tty_ioctl.c, and here's the whole squad of related fns β go read up, iykyk π
tty_chars_in_buffer(9)tty_write_room(9)tty_driver_flush_buffer(9)tty_unthrottle(9)tty_throttle_safe(9)tty_unthrottle_safe(9)tty_wait_until_sent(9)tty_termios_copy_hw(9)tty_termios_hw_change(9)tty_get_char_size(9)tty_get_frame_size(9)set_termios(9)set_sgttyb(9)tty_change_softcar(9)tty_mode_ioctl(9)
okay that's the page!! go forth and set those termios correctly, bestie β this one's from ./drivers/tty, dated October 2026, and it ate, no cap ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms