[lldb-dev] Process attach and pgid of forked process under Linux
tfiala at google.com
Tue Mar 25 10:30:26 PDT 2014
I'd suggest trying the change, running the tests, and see if anything new
And if this fixes currently broken behavior, add a test to make sure we
don't regress it. I'm pretty sure if it breaks something we'll know pretty
quickly (either via bugs or our own usage). At which point - we should add
a test so we don't regress in the future and perhaps add a few comments as
to the reason.
On Tue, Mar 25, 2014 at 9:54 AM, <jingham at apple.com> wrote:
> Why are you waiting for process groups? That's not something we have to
> do on Mac OS X.
> On Mar 25, 2014, at 1:17 AM, Andrew MacPherson <andrew.macp at gmail.com>
> > Currently under Linux if you attach to a process whose process group id
> is not equal to its process id (such as the child process of a fork() call)
> the calls to waitpid() that pass -1*pid will return ECHILD since the pid
> argument refers to a process group that doesn't exist. These calls occur in
> Host::MonitorChildProcessThreadFunction() and the Linux ProcessMonitor.
> > Changing -1*pid to simply -1 or to -1*getpgid(pid) resolves the issue
> but it's not clear if this is the right fix as I'm unsure how other OSes
> deal with this scenario.
> > Any thoughts?
> > Thanks,
> > Andrew
> > _______________________________________________
> > lldb-dev mailing list
> > lldb-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lldb-dev