<div dir="ltr">Hi,<div><br><div>1. Use "bp::child c(bp::search_path("ping"), "127.0.0.1", "-t", bp::std_out > is);"</div></div><div>2. I'm on Windows, Boost 1.66, VS2017 and output is generated. (With your original code: "Ping request could not find host 127.0.0.1 -t. Please check the name and try again.")</div><div><br></div><div>J</div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-01-02 10:15 GMT+01:00 Sebastian Messerschmidt via Boost-users <span dir="ltr"><<a href="mailto:boost-users@lists.boost.org" target="_blank">boost-users@lists.boost.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br> <br> I'm using boost 1.64 on Windows7 with VisualStudio 2015 64bit.<br> While testing boost.process I've encountered some issues that I'm not able to resolve:<br> <br> 1. Passing of multiple parameters:<br> <br> Consider this minimal example:<br> <br> <code><br> void test_sync()<br> {<br> try<br> {<br> bp::ipstream is;<br> bp::child c(bp::search_path("ping"), "127.0.0.1 -t", bp::std_out > is);<br> std::string line;<br> while (c.running() && std::getline(is, line) && !line.empty())<br> {<br> std::cerr << line << std::endl;<br> }<br> c.wait();<br> }<br> catch (const std::exception& e)<br> {<br> std::cerr << "Error in execution: " << e.what();<br> }<br> }<br> </code><br> <br> This doesn't correctly execute "ping 127.0.0.1 -t", instead it will act like "ping 127.0.0.1". I could not find an up2date example on how to pass parameters correctly. Any ideas?<br> <br> 2. No output on std::cout<br> 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)<br> In those instances, redirection fails. Can anyone think of a way to still monitor the output of the spawned child?<br> <br> Cheers<br> Sebastian<br> <br> <br> ______________________________<wbr>_________________<br> Boost-users mailing list<br> <a href="mailto:Boost-users@lists.boost.org" target="_blank">Boost-users@lists.boost.org</a><br> <a href="https://lists.boost.org/mailman/listinfo.cgi/boost-users" rel="noreferrer" target="_blank">https://lists.boost.org/mailma<wbr>n/listinfo.cgi/boost-users</a><br> </blockquote></div><br></div>