# tmuxtest.StartPTYProcess

- **Module:** tmuxtest
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/tmuxtest/pty_process.go#L57
- **Page:** https://libtmux.org/reference/go/tmuxtest-startptyprocess/

```
tmuxtest.StartPTYProcess(ctx: context.Context, t: testing.TB, binary: string, arguments: []string, environment: []string) -> *PTYProcess
```

StartPTYProcess starts binary with a harness-owned controlling terminal and registers bounded cleanup with t. Its start context owns the child lifetime: canceling ctx terminates the child. Arguments and environment are copied. A nil environment inherits the current process environment; a non-nil empty environment remains empty. binary runs directly without a shell. The PTY backend is supported on Linux only; unsupported platforms call [testing.TB.Fatal]. Setup failures also call [testing.TB.Fatal].
