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
* [Bug go/64573] Cmd.Start swallows error from fork()/clone() 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 ` 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 2 siblings, 0 replies; 4+ messages in thread From: eswierk at gmail dot com @ 2015-01-12 21:51 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64573 Ed Swierk <eswierk at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34428|0 |1 is obsolete| | --- Comment #1 from Ed Swierk <eswierk at gmail dot com> --- Created attachment 34430 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34430&action=edit Proposed fix (in proper patch format) ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug go/64573] Cmd.Start swallows error from fork()/clone() 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 2 siblings, 0 replies; 4+ messages in thread From: ian at gcc dot gnu.org @ 2015-01-23 23:45 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64573 --- Comment #2 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> --- Author: ian Date: Fri Jan 23 23:45:04 2015 New Revision: 220068 URL: https://gcc.gnu.org/viewcvs?rev=220068&root=gcc&view=rev Log: PR go/64573 syscall: Restore line somehow lost in libgo merge. Modified: trunk/libgo/go/syscall/exec_unix.go ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug go/64573] Cmd.Start swallows error from fork()/clone() 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 2 siblings, 0 replies; 4+ messages in thread From: ian at airs dot com @ 2015-01-23 23:47 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64573 Ian Lance Taylor <ian at airs dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #3 from Ian Lance Taylor <ian at airs dot com> --- Fixed. Thanks for pointing out the problem. ^ 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).