llvm-project/lldb/source/Host
Pavel Labath 998bdc5b75 Generalize child process monitoring functions
Summary:
This replaces the C-style "void *" baton of the child process monitoring functions with a more
C++-like API taking a std::function. The motivation for this was that it was very difficult to
handle the ownership of the object passed into the callback function -- each caller ended up
implementing his own way of doing it, some doing it better than others. With the new API, one can
just pass a smart pointer into the callback and all of the lifetime management will be handled
automatically.

This has enabled me to simplify the rather complicated handshake in Host::RunShellCommand. I have
left handling of MonitorDebugServerProcess (my original motivation for this change) to a separate
commit to reduce the scope of this change.

Reviewers: clayborg, zturner, emaste, krytarowski

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D20106

llvm-svn: 269205
2016-05-11 16:59:04 +00:00
..
android [linux] Remove all traces of signalfd(2) 2016-02-23 12:26:08 +00:00
common Generalize child process monitoring functions 2016-05-11 16:59:04 +00:00
freebsd Make lldb::endian::InlHostByteOrder() private. 2015-11-07 04:40:13 +00:00
linux Renamed system plugin directory to address https://bugs.swift.org/browse/SR-1093 2016-04-27 17:49:51 +00:00
macosx Generalize child process monitoring functions 2016-05-11 16:59:04 +00:00
netbsd Remove autoconf support from source directories. 2016-01-28 22:05:24 +00:00
posix Generalize child process monitoring functions 2016-05-11 16:59:04 +00:00
windows Generalize child process monitoring functions 2016-05-11 16:59:04 +00:00
CMakeLists.txt Added real editline tests. 2015-10-30 02:54:52 +00:00