public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug go/64573] New: Cmd.Start swallows error from fork()/clone()
@ 2015-01-12 21:49 eswierk at gmail dot com
  2015-01-12 21:51 ` [Bug go/64573] " eswierk at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: eswierk at gmail dot com @ 2015-01-12 21:49 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-23 23:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-12 21:49 [Bug go/64573] New: Cmd.Start swallows error from fork()/clone() eswierk at gmail dot com
2015-01-12 21:51 ` [Bug go/64573] " eswierk at gmail dot com
2015-01-23 23:45 ` ian at gcc dot gnu.org
2015-01-23 23:47 ` ian at airs dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).