20 #ifndef MIR_TEST_FRAMEWORK_PROCESS_H_
21 #define MIR_TEST_FRAMEWORK_PROCESS_H_
32 namespace mir_test_framework
99 template<
typename Callable>
101 Callable&& main_fn, std::function<
int()> exit_fn)
107 throw std::runtime_error(
"Failed to fork process");
116 return std::shared_ptr<Process>(
new Process(pid));
120 #endif // MIR_TEST_FRAMEWORK_PROCESS_H_
std::ostream & operator<<(std::ostream &out, const Result &result)
Process & operator=(const Process &)=delete
int signal
Definition: process.h:59
TerminationReason
Definition: process.h:35
std::shared_ptr< Process > fork_and_run_in_a_different_process(Callable &&main_fn, std::function< int()> exit_fn)
Definition: process.h:100
Result wait_for_termination(const std::chrono::milliseconds &timeout=std::chrono::milliseconds(60 *1000))
TerminationReason reason
Definition: process.h:57
int exit_code
Definition: process.h:58