tty_unregister_ldisc(9)
π tty_unregister_ldisc(9) β straight from the Kernel API Manual π
okay bestie, this is the manual page for tty_unregister_ldisc(9), and it is lowkey serving kernel-internals realness β¨
πΈ NAME πΈ
tty_unregister_ldisc β unload a line discipline π
π SYNOPSIS π
void tty_unregister_ldisc (const struct tty_ldisc_ops *ldisc );
π¦ ARGUMENTS π¦
ldiscβ ldisc number. that's it, that's the arg π«Ά
β¨ DESCRIPTION β¨
so this function removes a line discipline from the kernel β but only providing it is not currently in use. periodt π
π¨ bestie caveat: if it is currently in use, that's a no-go. the "providing it is not currently in use" part is doing a lot of work here.
Locking: takes tty_ldiscs_lock to guard against ldisc races π no cap, that lock is there to keep the ldisc situation from getting messy.
π SEE ALSO π
Kernel file ./drivers/tty/tty_ldisc.c is the spot, and here's the whole friend group π
tty_register_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_reinit(9)tty_ldisc_hangup(9)tty_ldisc_setup(9)tty_ldisc_release(9)tty_ldisc_init(9)tty_ldisc_deinit(9)
π from ./drivers/tty, dated October 2026 β that's the whole page, 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