golang.org/pkg/os/exec/#Cmd.StderrPipe

"Wait will close the pipe after seeing the command exit, so ... it is 
incorrect to call Wait before all reads from the pipe have completed."

Put wg.Wait() of the read/writes from/to the pipes before calling 
sess.Wait(). (So it is not ok to call it in a goroutine).


2018. március 1., csütörtök 21:01:17 UTC+1 időpontban Mark Sheahan a 
következőt írta:
>
> We've had an integration test that has very occasionally failed since go 
> 1.8.x, which is that a pipe reader appears to be getting closed rather than 
> just giving EOF when the writer is closed. An isolated test case is here in 
> this repository: https://github.com/marksheahan/pipebug, just checkout 
> and run 'make' a few times to reproduce.
>
> The problem only occurs on Linux; I have never reproduced the problem on 
> Darwin. Am I misusing the os/exec.Cmd API somehow? I don't understand what 
> I am doing incorrectly if anything.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to