Home | Libraries | People | FAQ | More |
Table of Contents
Boost.Process is a library to manage system processes. It can be used to:
While Boost.Process does not support platform specific features it provides
extension points. Developers can plug in functions, eg. to set the uid
of a child process on a POSIX system.
Here's an example of how easy it is to start a program with Boost.Process.
#include <boost/process/all.hpp> #include <string> int main() { std::string exe = boost::process::find_executable_in_path("hostname"); boost::process::create_child(exe); }
The example searches for an executable hostname in the directories of the environment variable PATH and starts the program. As the standard output stream is inherited the hostname is printed when you run the example.
Last revised: October 06, 2010 at 22:00:35 GMT |