ptyrun — run a program under a pseudo-terminal
ptyrun
{next-prog
}
ptyrun enables running programs that expect terminals on their standard file descriptors, in situations where there are no controlling terminals and the standard file descriptors are things such as pipes or sockets.
It does not itself expect to be running connected to a terminal, and it takes no steps to adjust terminal modes if it is.
If next-prog
stops with a signal, it is simply continued.
ptyrun combines pty-get-tty(1), pty-run(1), and open-controlling-tty(1) to run next-prog
with its standard input, output, and error routed through a pseudo-terminal.
It is a script that needs execlineb(1) as its script interpreter.
next-prog
may contain its own command line options, which pty-run will ignore.
See open-controlling-tty(1) for the environment and open file descriptors inherited by next-prog
.