This is an archive of the discontinued LLVM Phabricator instance.

[NativeProcessLinux] Support inferiors which change their process group
ClosedPublic

Authored by labath on May 27 2015, 8:39 AM.

Details

Summary

Previously, we wait()ed for events from the inferiors process group. This is resulted in a
failure if the inferior changed its process group in the middle of execution. To avoid this, I
pass -1 to the wait() call. The flag __WNOTHREAD makes sure we don't actually wait for events
from any process, but only the processes(threads) which are our children (or traced by us). Since
this happens on the monitor thread, which is dedicated to monitoring a single inferior, we will
be getting events only from this inferior.

Diff Detail

Repository
rL LLVM

Event Timeline

labath updated this revision to Diff 26598.May 27 2015, 8:39 AM
labath retitled this revision from to [NativeProcessLinux] Support inferiors which change their process group.
labath updated this object.
labath edited the test plan for this revision. (Show Details)
labath added reviewers: chaoren, ovyalov.
labath added a subscriber: Unknown Object (MLST).
ovyalov accepted this revision.May 27 2015, 5:04 PM
ovyalov edited edge metadata.

LGTM

source/Plugins/Process/Linux/NativeProcessLinux.cpp
896 ↗(On Diff #26598)

s/,/;

This revision is now accepted and ready to land.May 27 2015, 5:04 PM
This revision was automatically updated to reflect the committed changes.