ptyrun 1 user commands nosh
ptyrun run a program under a pseudo-terminal
`ptyrun` next-prog

## Description

`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-allocate 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-terminal 1 for the environment and open file descriptors inherited by next-prog.

## History

There was a `ptyrun` shell script in Daniel J. Bernstein's pty package in 1996. This workalike `execlineb` script based upon nosh tools was created in 2013.

## Author

Jonathan de Boyne Pollard