Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::process
From: Chris Rodgers (christopher.rodgers_at_[hidden])
Date: 2017-10-05 21:14:57

To answer my own question - this is one working possibility using

#include <boost/process.hpp>
#include <boost/process/extend.hpp>

int main()
        boost::filesystem::path myPath(".........toRun.exe.......");

        auto set_own_window = [](auto & exec)
            exec.creation_flags |=
            std::cerr << "in set_own_window" << std::endl; /* just for
debugging */

        bp::child c(myPath, "argument1",

    return 0;

This works. Is it the right approach, or is there a better way?

Best wishes,


On 05/10/2017 17:14, Chris Rodgers wrote:
> Hi,
> I'm trying to use Boost 1.65.1's boost::process::child in a Windows
> console program.
> At the moment, the child process is launched in the same console window
> as the parent.
> Is there an option to make a new console window for the child?
> The pre-boost-incorporation version of boost::process seemed to allow
> manipulation of the startupInfo struct directly (e.g.
> and then a win32_launch call. But this seems to have been removed now?
> Any tips gratefully received.
> Thanks,
> Chris.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at