Skip to content

Commit 7b814e3

Browse files
committed
Fix dev client stdin closure
1 parent 7072a7d commit 7b814e3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dev/client/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ func do(fl *pflag.FlagSet, tty bool) {
9797

9898
go io.Copy(os.Stdout, process.Stdout())
9999
go io.Copy(os.Stderr, process.Stderr())
100-
go io.Copy(process.Stdin(), os.Stdin)
100+
go func() {
101+
stdin := process.Stdin()
102+
defer stdin.Close()
103+
io.Copy(stdin, os.Stdin)
104+
}()
101105

102106
err = process.Wait()
103107
if err != nil {

0 commit comments

Comments
 (0)