20 #ifndef MIR_TEST_FRAMEWORK_PROCESS_H_ 21 #define MIR_TEST_FRAMEWORK_PROCESS_H_ 102 template<
typename Callable>
104 Callable&& main_fn, std::function<
int()> exit_fn)
110 throw std::runtime_error(
"Failed to fork process");
119 return std::shared_ptr<Process>(
new Process(pid));
123 #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:62
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:103
Result wait_for_termination(const std::chrono::milliseconds &timeout=std::chrono::milliseconds(60 *1000))
TerminationReason reason
Definition: process.h:60
Definition: any_surface.h:25
bool exited_normally() const
int exit_code
Definition: process.h:61