pty_write(9)
hiii bestie π welcome to pty_write(9) from the Kernel API Manual β todayβs vibe check is βwriting to a pty,β and ngl itβs kind of iconic β¨
π NAME π
pty_write β write to a pty, periodt π
β¨ SYNOPSIS β¨
the way that the signature is literally right here, no cap:
ssize_t pty_write (struct tty_struct *tty , const u8 *buf , size_t c );
π ARGUMENTS π
ttyβ the tty we write from π«Άbufβ kernel buffer of data π¦cβ bytes to write π’
π¦ DESCRIPTION π¦
okay so this is our βhardwareβ write method π β yes, the quotes are doing a lot of work there, bestie π. Data is coming from the ldisc, which may be in a non sleeping state π΄π«.
We simply throw this at the other end of the link, as if we were an IRQ handler receiving stuff for the other side of the pty/tty pair π₯. Thatβs the whole vibe. Itβs giving main character energy, fr fr π
not me romanticizing a kernel write path, but here we are π
π₯ SEE ALSO π₯
Kernel file ./drivers/tty/pty.c β and the related pages are pty_write_room(9), pty_resize(9), pty_start(9), pty_common_install(9), ptm_open_peer(9), ptm_unix98_lookup(9), pts_unix98_lookup(9), ptmx_open(9) β go read them, bestie π«Ά
mwah π this little page lives in ./drivers/tty, is dated October 2026, and goes by pty_write(9) β byeeee πβ¨
π¦ 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