This is an archive of the discontinued LLVM Phabricator instance.

Unify process launching code on linux
ClosedPublic

Authored by labath on Jul 18 2016, 4:29 AM.

Details

Summary

We've had two copies of code for launching processes:

  • one in NativeProcessLinux, used for launching debugged processes
  • one in ProcessLauncherAndroid, used on android for launching all other kinds of processes

These have over time acquired support for various launch options, but neither supported all of
them. I now replace them with a single implementation ProcessLauncherLinux, which supports all
the options the individual versions supported and set it to be used to launch all processes on
linux.

This also works around the ETXTBSY issue on android when the process is started from the platform
instance, as that used to go through the version which did not contain the workaround.

Diff Detail

Repository
rL LLVM

Event Timeline

labath updated this revision to Diff 64296.Jul 18 2016, 4:29 AM
labath retitled this revision from to Unify process launching code on linux.
labath updated this object.
labath added a reviewer: tberghammer.
labath added a subscriber: lldb-commits.
tberghammer accepted this revision.Jul 21 2016, 3:33 AM
tberghammer edited edge metadata.

Looks good with 2 minor comments

source/Host/linux/ProcessLauncherLinux.cpp
28–29 ↗(On Diff #64296)

(nit): Please move this comment into the ifdef ANDROID block

49 ↗(On Diff #64296)

Should we close the file descriptor before exiting?

This revision is now accepted and ready to land.Jul 21 2016, 3:33 AM
labath marked 2 inline comments as done.Jul 21 2016, 7:56 AM
This revision was automatically updated to reflect the committed changes.
lldb/trunk/source/Host/CMakeLists.txt