This is an archive of the discontinued LLVM Phabricator instance.

Don't fail on EINTR, unless we have set a timeout.
ClosedPublic

Authored by jlerouge on Jun 25 2014, 7:34 PM.

Details

Reviewers
tareqsiraj
Summary

lldb can interrupt waitpid, so EINTR shouldn't be an error. This fixes the case
where there is no timeout. In the case where there is a timeout though, the
code is still wrong since it doesn't check that the alarm really went off.

Without this patch, I cannot debug a program that forks itself using
sys::ExecuteAndWait with lldb.

Diff Detail

Event Timeline

jlerouge updated this revision to Diff 10876.Jun 25 2014, 7:34 PM
jlerouge retitled this revision from to Don't fail on EINTR, unless we have set a timeout..
jlerouge updated this object.
jlerouge edited the test plan for this revision. (Show Details)
jlerouge added a reviewer: tareqsiraj.
jlerouge added a subscriber: Unknown Object (MLST).
tareqsiraj accepted this revision.Jun 27 2014, 6:57 AM
tareqsiraj edited edge metadata.

Looks ok.

This revision is now accepted and ready to land.Jun 27 2014, 6:57 AM
jlerouge updated this object.Jun 27 2014, 11:03 AM
jlerouge edited edge metadata.
jlerouge closed this revision.Jun 27 2014, 11:07 AM

Thanks, committed in r211918.