Eio_unix.PtySourceCreating and controlling pseudoterminals.
Pseudoterminal (PTY) support.
A pseudoterminal is a pair of connected file descriptors emulating a terminal. The pseudoterminal device is used by a controlling program such as a terminal emulator, while the terminal device is used by a child process as its controlling terminal.
A connected pseudoterminal pair.
source t reads the output the child writes to terminal.
sink t writes input for the child to read from its terminal.
type winsize = {rows : int;Height of the terminal in character rows.
*)cols : int;Width of the terminal in character columns.
*)xpixel : int;Width in pixels (0 if unknown).
ypixel : int;Height in pixels (0 if unknown).
}Terminal window dimensions.
get_window_size fd returns the window size of terminal fd.
set_window_size fd ws sets the window size of terminal fd.
Setting it on the pty end updates the terminal and delivers SIGWINCH to the foreground process group attached to the terminal.