Boost logo

Boost Users :

Subject: [Boost-users] [process] Couple of issues
From: Sebastian Messerschmidt (sebastian.messerschmidt_at_[hidden])
Date: 2018-01-02 09:15:31


I'm using boost 1.64 on Windows7 with VisualStudio 2015 64bit.
While testing boost.process I've encountered some issues that I'm not
able to resolve:

1. Passing of multiple parameters:

Consider this minimal example:

void test_sync()
                bp::ipstream is;
                bp::child c(bp::search_path("ping"), " -t", bp::std_out > is);
                std::string line;
                while (c.running() && std::getline(is, line) && !line.empty())
                        std::cerr << line << std::endl;
        catch (const std::exception& e)
                std::cerr << "Error in execution: " << e.what();

This doesn't correctly execute "ping -t", instead it will act
like "ping". I could not find an up2date example on how to
pass parameters correctly. Any ideas?

2. No output on std::cout
It seems that some applications don't output to std::cout/clog/cerr but
somehow via printing to console directly (my guess as it is colored
output on windows)
In those instances, redirection fails. Can anyone think of a way to
still monitor the output of the spawned child?


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