Hello,
I am trying to monitor a process using os/exec.Cmd but when I try to Wait(), I always face a race.
I have a very basic code that works fine:
When I quit cat with ctrl-d, the program exits as expected.
However, when I try to close manually, the race detector is not happy:
This is exactly the same thing except that after 5 seconds I close stdin.
Then I tried using the StdinPipe() from Cmd, but still not luck:
Is there a way to do Cmd.Wait() and close Stdin without a race?
Thanks in advance.
Regards,
--
Guillaume J. Charmes