#15382 and #15421 both need to execute commands, monitor their process and/or consume their stdout
. At the moment they both add boost-process.
There is also an alternative cpp-subprocess which has less code, but probably also less review and doesn’t work with Windows yet.
We currently ship Boost 1.64 so the corresponding boost-process code is here.
Usage wise it’s super simple.
The code is spread over at least a hundred small files, which makes it hard to understand the whole, although I’m it makes sense to someone more familiar with Boost. Each component seems well documented. I’m not sure how to go about reviewing this.
It includes the following other Boost components, outside of what we already directly include:
0#include <boost/algorithm/string/case_conv.hpp>
1#include <boost/algorithm/string/join.hpp>
2#include <boost/algorithm/string/predicate.hpp>
3#include <boost/algorithm/string/trim.hpp>
4#include <boost/asio/async_result.hpp>
5#include <boost/asio/buffer.hpp>
6#include <boost/asio/dispatch.hpp>
7#include <boost/asio/io_context.hpp>
8#include <boost/asio/posix/stream_descriptor.hpp>
9#include <boost/asio/post.hpp>
10#include <boost/asio/read.hpp>
11#include <boost/asio/signal_set.hpp>
12#include <boost/asio/strand.hpp>
13#include <boost/asio/streambuf.hpp>
14#include <boost/asio/windows/object_handle.hpp>
15#include <boost/asio/windows/stream_handle.hpp>
16#include <boost/asio/write.hpp>
17#include <boost/config.hpp>
18#include <boost/core/ignore_unused.hpp>
19#include <boost/filesystem/operations.hpp>
20#include <boost/filesystem/path.hpp>
21#include <boost/fusion/adapted/std_tuple.hpp>
22#include <boost/fusion/algorithm/iteration/for_each.hpp>
23#include <boost/fusion/algorithm/query/find_if.hpp>
24#include <boost/fusion/algorithm/transformation/filter_if.hpp>
25#include <boost/fusion/algorithm/transformation/transform.hpp>
26#include <boost/fusion/container.hpp>
27#include <boost/fusion/container/set/convert.hpp>
28#include <boost/fusion/container/vector/convert.hpp>
29#include <boost/fusion/iterator/deref.hpp>
30#include <boost/fusion/sequence.hpp>
31#include <boost/fusion/sequence/comparison/equal_to.hpp>
32#include <boost/fusion/sequence/intrinsic/begin.hpp>
33#include <boost/fusion/sequence/intrinsic/end.hpp>
34#include <boost/fusion/sequence/intrinsic/has_key.hpp>
35#include <boost/fusion/tuple.hpp>
36#include <boost/fusion/view.hpp>
37#include <boost/fusion/view/transform_view.hpp>
38#include <boost/iterator/transform_iterator.hpp>
39#include <boost/move/move.hpp>
40#include <boost/none.hpp>
41#include <boost/system/api_config.hpp>
42#include <boost/system/error_code.hpp>
43#include <boost/tokenizer.hpp>
44#include <boost/type_index.hpp>
45#include <boost/winapi/access_rights.hpp>
46#include <boost/winapi/basic_types.hpp>
47#include <boost/winapi/character_code_conversion.hpp>
48#include <boost/winapi/config.hpp>
49#include <boost/winapi/dll.hpp>
50#include <boost/winapi/environment.hpp>
51#include <boost/winapi/error_codes.hpp>
52#include <boost/winapi/file_management.hpp>
53#include <boost/winapi/get_current_process.hpp>
54#include <boost/winapi/get_current_process_id.hpp>
55#include <boost/winapi/get_last_error.hpp>
56#include <boost/winapi/get_system_directory.hpp>
57#include <boost/winapi/handle_info.hpp>
58#include <boost/winapi/handles.hpp>
59#include <boost/winapi/jobs.hpp>
60#include <boost/winapi/overlapped.hpp>
61#include <boost/winapi/pipes.hpp>
62#include <boost/winapi/process.hpp>
63#include <boost/winapi/shell.hpp>
64#include <boost/winapi/show_window.hpp>
65#include <boost/winapi/synchronization.hpp>
66#include <boost/winapi/wait.hpp>
I’m not sure which of those we’re already indirectly using.
I found the following includes, outside of what we already directly include:
0#include <features.h>
1#include <initializer_list>
2#include <io.h>
3#include <iosfwd>
4#include <istream>
5#include <ostream>
6#include <streambuf>
7#include <system_error>
The lists were composed with grep -rhw . -e '#include' --include=\*.{h,cpp,hpp} | sort | uniq
and comm -23 boost bitcoin
.