package notty
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=74659fb14073db4438989891ab24f24bef81aa497dac16d9a67f9a1c9c200824
sha512=6e21d44fe39f3d80884b87635bebae55cb2b931ef74f9184ba4d74cc3e51cb0b3e976c3b6dc61d377288504e8bfabe21acdc1069eacb30df1fbf6686b80f7c6b
doc/notty.unix/Notty_unix/Term/Winch/index.html
Module Term.Winch
Source
Manual SIGWINCH
handling.
Unix delivers notifications about tty size changes through the SIGWINCH
signal. A handler for this signal is installed as soon as a new terminal is created. Replacing the global SIGWINCH
handler using the Sys
module will cause this module to malfunction, as the size change notifications will no longer be delivered.
You might still want to ignore resizes reported by event
and directly listen to SIGWINCH
. This module allows installing such listeners without conflicting with the rest of the machinery.
add fd f
registers a SIGWINCH
handler. Every time the signal is delivered, f
is called with the current size of the tty backing fd
. If fd
is not a tty, f
is never called.
Return value is a function that removes the handler f
.
Handlers are called in an unspecified order.