We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent6230d55 commit0437680Copy full SHA for 0437680
pty/pty.go
@@ -29,7 +29,11 @@ type PTY interface {
29
Resize(heightuint16,widthuint16)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
typeProcessinterface {
38
39
// Wait for the command to complete. Returned error is as for exec.Cmd.Wait()