mirror of https://github.com/coder/coder.git
Explain pty Process abstraction (#3254)
Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
parent
6230d5512e
commit
043768076f
|
@ -29,7 +29,11 @@ type PTY interface {
|
|||
Resize(height uint16, width uint16) error
|
||||
}
|
||||
|
||||
// Process represents a process running in a PTY
|
||||
// Process represents a process running in a PTY. We need to trigger special processing on the PTY
|
||||
// on process completion, meaning that we will have goroutines calling Wait() on the process. Since
|
||||
// the caller will also typically wait for the process, and it is not safe for multiple goroutines
|
||||
// to Wait() on a process, this abstraction provides a goroutine-safe interface for interacting with
|
||||
// the process.
|
||||
type Process interface {
|
||||
|
||||
// Wait for the command to complete. Returned error is as for exec.Cmd.Wait()
|
||||
|
|
Loading…
Reference in New Issue