PrevUpHomeNext

Function template wait_for_exit

boost::process::wait_for_exit

Synopsis

// In header: <boost/process/wait_for_exit.hpp>


template<typename Process> int_type wait_for_exit(const Process & p);

Description

Waits for a process to exit.

On Window boost::process::wait_for_exit returns the exit code of the process. On POSIX the exit status is returned. You must use the macro WEXITSTATUS (defined in sys/wait.h) to fetch the exit code from the exit status.

[Note] Note

This is a blocking function.

Throws:

boost::system::system_error in case of an error

PrevUpHomeNext