openpt.1 (877B)
- .\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils-openpt@hacktivis.me>
- .\" SPDX-License-Identifier: MIT
- .Dd 2024-06-02
- .Dt OPENPT 1
- .Os
- .Sh NAME
- .Nm openpt
- .Nd Start program in a new pseudo-terminal
- .Sh SYNOPSIS
- .Nm
- .Ar command
- .Op argument...
- .Sh DESCRIPTION
- .Nm
- executes
- .Ar command
- inside of a new pseudo-terminal, with standard I/Os copied in/out.
- .Pp
- Note that when executing prompts such as a shell, you might need
- to send an explicit EOF, like so:
- .Dl % printf 'ls\en\e004' | openpt sh
- This behavior might change in future versions.
- .Sh EXIT STATUS
- .Ex -std
- .Sh EXAMPLES
- Test interactive mode of
- .Cm mv :
- .Bd -literal -offset indent
- #!/bin/sh
- set -e
- touch src no_write
- chmod -w no_write
- echo y | openpt mv src no_write
- test ! -e src
- test -f no_write
- .Ed
- .Sh STANDARDS
- None.
- .Sh AUTHORS
- .An Haelwenn (lanodan) Monnier Aq Mt contact+utils-openpt@hacktivis.me