tty_ldisc_reinit(9)
β¨ NAME β¨
okay so welcome to the Kernel API Manual, bestie β this page is highkey all about tty_ldisc_reinit, aka reinitialise the tty ldisc, and it's literally the βclose the old instance, open a new oneβ reset moment for your line discipline π
β¨
πΈ SYNOPSIS πΈ
int tty_ldisc_reinit (struct tty_struct *tty , int disc );
π ARGUMENTS π
ttyβ the tty to reinit, periodt. That's the one getting the glow-up π«Άdiscβ the line discipline to reinitialize. Yes, that exact one, bestie.
π DESCRIPTION π
The way this function completely reinitializes the line discipline state? Obsessed. It closes the current instance β if there is one β and opens a new instance, fr fr. Main character energy, ngl β¨
If an error occurs opening the new non-N_TTY instance, that instance is dropped and tty->ldisc gets reset to NULL. The caller can then retry with N_TTY instead, iykyk ππ
π₯ RETURN π₯
0if successful β slay β- otherwise, an error code
< 0β not slay, but at least you know π
π¦ SEE ALSO π¦
Kernel file: ./drivers/tty/tty_ldisc.c. Go give these icons a vibe check too:
tty_register_ldisc(9)tty_unregister_ldisc(9)tty_ldisc_get(9)tty_ldisc_put(9)tty_ldisc_ref_wait(9)tty_ldisc_ref(9)tty_ldisc_deref(9)tty_ldisc_flush(9)tty_set_termios_ldisc(9)tty_ldisc_open(9)tty_ldisc_close(9)tty_ldisc_failto(9)tty_ldisc_restore(9)tty_set_ldisc(9)tty_ldisc_kill(9)tty_reset_termios(9)tty_ldisc_hangup(9)tty_ldisc_setup(9)tty_ldisc_release(9)tty_ldisc_init(9)tty_ldisc_deinit(9)
That's the whole Kernel API Manual page, freshly shipped from ./drivers/tty in October 2026 β bye bestie, mwah π«Άπβ¨
π¦ 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