Skip to content

Commit 42656a4

Browse files
committed
Fix pty tests on Windows
1 parent 2606fda commit 42656a4

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

agent/agent.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ func (*server) handleSSHSession(session ssh.Session) error {
208208
_, _ = io.Copy(session, ptty.Output())
209209
}()
210210
_, _ = process.Wait()
211+
_ = ptty.Close()
211212
return nil
212213
}
213214

pty/start_other.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,5 @@ func startPty(cmd *exec.Cmd) (PTY, *os.Process, error) {
3232
pty: ptty,
3333
tty: tty,
3434
}
35-
go func() {
36-
_ = cmd.Wait()
37-
_ = oPty.Close()
38-
}()
3935
return oPty, cmd.Process, nil
4036
}

pty/start_windows.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ func startPty(cmd *exec.Cmd) (PTY, *os.Process, error) {
8383
if err != nil {
8484
return nil, nil, xerrors.Errorf("find process %d: %w", processInfo.ProcessId, err)
8585
}
86-
go func() {
87-
_, _ = process.Wait()
88-
_ = pty.Close()
89-
}()
9086
return pty, process, nil
9187
}
9288

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy