Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0437680

Browse files
authored
Explain pty Process abstraction (#3254)
Signed-off-by: Spike Curtis <spike@coder.com>
1 parent6230d55 commit0437680

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎pty/pty.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ type PTY interface {
2929
Resize(heightuint16,widthuint16)error
3030
}
3131

32-
// Process represents a process running in a PTY
32+
// 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.
3337
typeProcessinterface {
3438

3539
// Wait for the command to complete. Returned error is as for exec.Cmd.Wait()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp