tiocsti(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tiocsti(9) β€” from the Kernel API Manual

okay so bestie, pull up a chair because today we're looking at tiocsti(9), a lil kernel API page that is literally about faking keyboard input, and honestly? kinda iconic behavior πŸŽ€ no cap.


✨ NAME ✨

tiocsti β€” fake input character 🫢


🌸 SYNOPSIS 🌸

int tiocsti (struct tty_struct *tty , u8 __user *p );

that's it. that's the whole signature. slay πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • tty β€” the tty you wanna fake input into, bestie. that's the target 🎯
  • p β€” a pointer to the character. like, the actual char vibe you're injecting ✨

πŸ’– DESCRIPTION πŸ’–

so what does it do?? it fakes input to a tty device πŸŽ€ and like, it handles all the necessary locking and input management for you, which is highkey the whole point. you don't gotta worry about that part, it's giving responsible main character energy πŸ‘‘

FIXME: does not honour flow control ?? πŸ˜­πŸ’€ yeah that's a real note in the original, not me being messy fr fr. just know the flow control situation is, uh, unaddressed πŸ™ˆ

πŸ”’ Locking (the important bits, don't skip)

  • called functions take tty_ldiscs_lock β€” that's the lock situation, respect it πŸ’…
  • the current->signal->tty check is safe without locks, so no lock needed there, periodt ✨

🌈 SEE ALSO 🌈

kernel file ./drivers/tty/tty_io.c β€” and like, literally the entire tty cinematic universe, iykyk 😭:

like i said. the whole universe. go read 'em all, bestie, or at least the ones that matter to ur use case πŸ§šπŸ’œ


aaaand that's the page!! πŸ’– this lil beauty lives in ./drivers/tty, dated October 2026, and it's filed under tiocsti(9) β€” so go fake some input, stay locked, and don't forget the flow control FIXME, mwah πŸ“βœ¨

πŸ“¦ where this page comes from