Skip to content

Commit ab9997e

Browse files
committed
doc: add a note about os/exec
1 parent ae23b58 commit ab9997e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
Go-Pty is a package for using pseudo-terminal interfaces in Go. It supports Unix PTYs and Windows through [ConPty](https://learn.microsoft.com/en-us/windows/console/creating-a-pseudoconsole-session).
1010

11+
## Why can't we just use os/exec?
12+
13+
Windows requires updating the process running in the PTY with a [special attribute](https://learn.microsoft.com/en-us/windows/console/creating-a-pseudoconsole-session) to enable ConPty support. This is not possible with os/exec see [go#62708](https://github.com/golang/go/issues/62708) and [go#6271](https://github.com/golang/go/pull/62710). On Unix, `pty.Cmd` is just a wrapper around `os/exec.Cmd` that sets up the PTY.
14+
1115
## Usage
1216

1317
```sh

0 commit comments

Comments
 (0)