13 #include <boost/system/error_code.hpp>
14 #include <sys/types.h>
20 template <
class Process>
29 while ((
ret == -1 && errno == EINTR) || (
ret != -1 && !WIFEXITED(
status)));
32 BOOST_PROCESS_THROW_LAST_SYSTEM_ERROR(
"waitpid(2) failed");
37 template <
class Process>
38 inline int wait_for_exit(
const Process& p, boost::system::error_code& ec)
46 while ((
ret == -1 && errno == EINTR) || (
ret != -1 && !WIFEXITED(
status)));
49 BOOST_PROCESS_RETURN_LAST_SYSTEM_ERROR(ec);