tiocswinsz(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 tiocswinsz(9) β€” the "bestie, resize my window" kernel API πŸ’…

okay so this is a page straight out of the Kernel API Manual for tiocswinsz(9) β€” the kernel-side handler that implements the window size set ioctl. yes, the one that makes your terminal window change size. she's lowkey iconic.


✨ NAME ✨

tiocswinsz β€” implement window size set ioctl


πŸ¦‹ SYNOPSIS πŸ¦‹

int tiocswinsz (struct tty_struct *tty , struct winsize __user *arg );

πŸŽ€ ARGUMENTS πŸŽ€

  • tty β€” the tty side of the tty, bestie. that's the one we're resizing πŸ’–
  • arg β€” a user buffer for the result 🫢

πŸ”₯ DESCRIPTION πŸ”₯

so what it actually does: it copies the user's idea of the window size over to the kernel. that's it, that's the whole vibe. πŸ“

traditionally this is just advisory information β€” like, a lil heads up, a suggestion, no cap. but for the Linux console it actually has driver level meaning and it triggers a VC resize. so on the console it's not just a suggestion, it's literally main character energy πŸ”₯

πŸ”’ Locking πŸ”’

Locking here is driver dependent, so it's giving choose-your-own-adventure:

  • the default do_resize method takes the tty termios mutex and ctrl.lock
  • the console takes its own lock first, then calls into the default method
ngl, the lock ordering is not a vibe you want to freestyle. read it twice, bestie. πŸ’€

🌈 SEE ALSO 🌈

the whole squad, fr fr β€” kernel file ./drivers/tty/tty_io.c plus:


that's the whole page, bestie β€” and it ships out of ./drivers/tty, stamped October 2026. go resize something responsibly πŸ’–βœ¨πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from