I ran into the same issue and am curious why this is observed only on windows and not mac/linux considering that the issue seems independent of the platform ?
On Friday, February 4, 2022 at 3:23:45 PM UTC-8 Pablo Caballero wrote: > Hi Ian! Thank you so much for sharing that link with me. It was very > enriching to read it. > > As I commented in my first message, the fact that the problem did not > occur on Mac got me a bit confused at first. > > Best! > > On Friday, February 4, 2022 at 5:42:00 PM UTC-3 Ian Lance Taylor wrote: > >> On Fri, Feb 4, 2022 at 12:30 PM Pablo Caballero <pdc...@gmail.com> >> wrote: >> > >> > Errata >> > >> > Go is blocked trying to read from the channel (exec\exec.go): >> > >> > for range c.goroutine { if err := <-c.errch; err != nil && copyError == >> nil { copyError = err } } >> > >> > I think that the problem happens if you specify an io.Writer as >> cmd.Stdout and such writer doesn’t satisfy os.File (Output() uses a >> bytes.Buffer internally) because in that case a Pipe is used (to copy data >> between the writer/process). It seems like the pipe is inherited by the >> child process and isn’t closed until the child finish (blocking the >> goroutine that reads from the pipe and writes to the writer even if the >> parent process is gone). >> >> For reference, this class of problems is https://go.dev/issue/23019. >> >> Ian >> > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/d23d9d91-f4ce-42c7-92bd-03ebd7bafef7n%40googlegroups.com.