https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64573
Bug ID: 64573 Summary: Cmd.Start swallows error from fork()/clone() Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: go Assignee: ian at airs dot com Reporter: eswierk at gmail dot com CC: cmang at google dot com Created attachment 34428 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34428&action=edit Proposed fix Cmd.Start ignores the error code from the underlying fork() or clone() syscall, instead returning a nil error while setting Process.Pid to 0. If the caller then tries to Wait on the command, it can end up reaping some other child process (since waitpid(0) means wait for any child in the process group). The attached patch should make the behavior identical to that of golang.