ptyrun — wrap a pty around a program
ptyrun obtains a new pty and runs
subprogram under it, transparently forwarding input and output.
ptyrun initializes the pty to sane mode.
Descriptors 0, 1, and 2 of
subprogram are redirected to the pty; its controlling terminal is set to the pty; descriptor 3 is redirected to
/dev/tty; environment variable
TTY gives the name of the pty.
subprogram exits, ptyrun exits with the same exit code.
subprogram stops, ptyrun immediately sends SIGCONT to
subprogram's process group.
ptyrun is a synonym for ptyget ptyio ptyspawn. ptyspawn(1) options may be used with ptyrun.