hvc_iucv_hangup(9)
π hvc_iucv_hangup β the manual page, bestie edition π
okay so this is hvc_iucv_hangup(9) from the Kernel API Manual, and honestly? she's a little chaotic but she gets the job done β¨
β¨ NAME β¨
hvc_iucv_hangup β sever that IUCV path and schedule the hvc tty hang up, periodt π
πΈ SYNOPSIS πΈ
void hvc_iucv_hangup (struct hvc_iucv_private *priv );
π¦ ARGUMENTS π¦
privβ a pointer to thehvc_iucv_privatestructure. that's it, that's the whole argument list, she's low maintenance π«Ά
π DESCRIPTION π
okay so here's the tea β β this routine severs an existing IUCV communication path and hangs up the underlying HVC terminal device. but bestie, listen: the hang-up only happens if an IUCV communication path is actually established. if there's no path, there's literally nothing to hang up, so no need to touch the terminal device. no cap π
the IUCV HVC hang-up is split into two steps, and the way that it works is:
- after the IUCV path has been severed, the
iucv_stateis set toIUCV_SEVERED. - later, when the HVC thread calls
hvc_iucv_get_chars, thatIUCV_SEVEREDstate is what causes the tty hang-up in the HVC layer. like, it's giving delayed gratification π
now for the "has the tty even been opened yet" vibe check:
- if the tty has not yet been opened, clean up the
hvc_iucv_privatestructure so re-connects are allowed. slay, tidy, iconic β¨ - if the tty has been opened, let
get_charsreturn-EPIPEto signal the HVC layer to hang up the tty and, if so, wake up the HVC thread to callget_chars... π (yes, the original really does trail off like that, we love an ellipsis queen)
π Special notes on hanging up a HVC terminal instantiated as console π
this part is highkey the main character energy of the whole page, so pay attention π«Ά
Hang-up:
do_tty_hangupreplaces file ops (=hung_up_tty_fops)do_tty_hangupcallstty->ops->closeforconsole_filp=> no hangup notifier is called by HVC (default)hvc_closereturns because oftty_hung_up_p(filp)=> no delete notifier is called! finally, the back-end is not being notified, thus, the tty session is kept active (TTY_OPEN) to be ready for re-connects π
β οΈ just a heads up, the numbering is literally1,2,2in the original β we're preserving that exactly, no editing, not me fixing it, nope π
Locking: spin_lock(priv->lock) w/o disabling bh π
π SEE ALSO π
Kernel file ./drivers/tty/hvc/hvc_iucv.c plus, like, the whole friend group:
hvc_iucv_get_private(9)alloc_tty_buffer(9)destroy_tty_buffer(9)destroy_tty_buffer_list(9)hvc_iucv_write(9)hvc_iucv_get_chars(9)hvc_iucv_queue(9)hvc_iucv_send(9)hvc_iucv_sndbuf_work(9)hvc_iucv_put_chars(9)hvc_iucv_notifier_add(9)hvc_iucv_cleanup(9)tty_outqueue_empty(9)flush_sndbuf_sync(9)hvc_iucv_notifier_hangup(9)hvc_iucv_dtr_rts(9)hvc_iucv_notifier_del(9)hvc_iucv_filter_connreq(9)hvc_iucv_path_pending(9)hvc_iucv_path_severed(9)hvc_iucv_msg_pending(9)hvc_iucv_msg_complete(9)hvc_iucv_alloc(9)hvc_iucv_destroy(9)hvc_iucv_parse_filter(9)hvc_iucv_setup_filter(9)param_set_vmidfilter(9)param_get_vmidfilter(9)hvc_iucv_init(9)hvc_iucv_config(9)
and that's the whole page, bestie π this lil gem lives in ./drivers/tty/hvc, dated October 2026, and the page itself is hvc_iucv_hangup(9) β go forth and hang up those ttys responsibly π§ββοΈπ
π¦ 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