Boost.Processで何かしようとしていますが、Boostディストリビューションにまだ受け入れられていません。Boost.Process - プロセスに関数を実行させる方法?
最も単純プログラムの開発は、私はこんにちは()関数を実行するために作成していますどのように背の高いプロセスへ
#include <boost/process.hpp>
#include <string>
#include <vector>
namespace bp = ::boost::process;
void Hello()
{
//... contents does not matter for me now - I just want to make a new process running this function using Boost.Process.
}
bp::child start_child()
{
std::string exec = "bjam";
std::vector<std::string> args;
args.push_back("--version");
bp::context ctx;
ctx.stdout_behavior = bp::silence_stream();
return bp::launch(exec, args, ctx);
}
int main()
{
bp::child c = start_child();
bp::status s = c.wait();
return s.exited() ? s.exit_status() : EXIT_FAILURE;
}
のように見えるのでしょうか?
これはBoost.Processが異なるコマンドライン引数で複数回プロセスを起動できるライブラリであることを意味しますか? – Rella
@Kabumbus :ready [this](http://www.highscore.de/boost/process/process/introduction.html)。これもおそらく[this](http://www.boost.org/doc/libs/1_45_0/)です。 doc/html/thread.html)はあなたが探しているものです – ybungalobill
私はそれを知っています。私はスレッドのいくつかを別のプロセスに入れたいと思っていました... – Rella