We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6230d55 commit 0437680Copy full SHA for 0437680
pty/pty.go
@@ -29,7 +29,11 @@ type PTY interface {
29
Resize(height uint16, width uint16) error
30
}
31
32
-// 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
33
+// on process completion, meaning that we will have goroutines calling Wait() on the process. Since
34
+// the caller will also typically wait for the process, and it is not safe for multiple goroutines
35
+// to Wait() on a process, this abstraction provides a goroutine-safe interface for interacting with
36
+// the process.
37
type Process interface {
38
39
// Wait for the command to complete. Returned error is as for exec.Cmd.Wait()
0 commit comments