| Home | Libraries | People | FAQ | More

## Function template system

boost::process::system

## Synopsis

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

    template<typename... Args> int system(Args &&... args);

## Description

Launches a process and waits for its exit. It works as std::system, though it allows all the properties boost.process provides. It will execute the process and wait for it's exit; then return the exit_code.

    int ret = system("ls");

| Note
Using this function with synchronous pipes leads to many potential deadlocks.

When using this function with an asynchronous properties and NOT passing an io_service object, the system function will create one and run it. When the io_service is passed to the function, the system function will check if it is active, and call the io_service::run function if not.