commit
87ece31efe
1 changed files with 6 additions and 6 deletions
|
@ -36,9 +36,9 @@ func prepareStdio(stdin, stdout, stderr string, console bool) (*sync.WaitGroup,
|
||||||
c.Close()
|
c.Close()
|
||||||
}
|
}
|
||||||
}(f)
|
}(f)
|
||||||
go func(w io.Writer) {
|
go func(w io.WriteCloser) {
|
||||||
io.Copy(w, os.Stdin)
|
io.Copy(w, os.Stdin)
|
||||||
f.Close()
|
w.Close()
|
||||||
}(f)
|
}(f)
|
||||||
|
|
||||||
f, err = fifo.OpenFifo(ctx, stdout, syscall.O_RDONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700)
|
f, err = fifo.OpenFifo(ctx, stdout, syscall.O_RDONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700)
|
||||||
|
@ -51,9 +51,9 @@ func prepareStdio(stdin, stdout, stderr string, console bool) (*sync.WaitGroup,
|
||||||
}
|
}
|
||||||
}(f)
|
}(f)
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func(r io.Reader) {
|
go func(r io.ReadCloser) {
|
||||||
io.Copy(os.Stdout, r)
|
io.Copy(os.Stdout, r)
|
||||||
f.Close()
|
r.Close()
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}(f)
|
}(f)
|
||||||
|
|
||||||
|
@ -68,9 +68,9 @@ func prepareStdio(stdin, stdout, stderr string, console bool) (*sync.WaitGroup,
|
||||||
}(f)
|
}(f)
|
||||||
if !console {
|
if !console {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func(r io.Reader) {
|
go func(r io.ReadCloser) {
|
||||||
io.Copy(os.Stderr, r)
|
io.Copy(os.Stderr, r)
|
||||||
f.Close()
|
r.Close()
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}(f)
|
}(f)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue