[lldb-dev] Process attach and pgid of forked process under Linux
Todd Fiala
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
fails.
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.
>
> Jim
>
>
> On Mar 25, 2014, at 1:17 AM, Andrew MacPherson <andrew.macp at gmail.com>
> wrote:
>
> > 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
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>
--
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140325/8cab6ceb/attachment.html>
More information about the lldb-dev
mailing list