问题
Is there a well-known, portable, good library for C++ process management?
I found a promising library called Boost.Process, but it's only a candidate for inclusion in the Boost library. Has anyone use this? Does anyone know why it isn't a part of Boost?
回答1:
How much management do you need? Just fork/exec? IPC? Resource management? Security contexts and process isolation?
I haven't used the Boost.Process library. However, I do know that getting included in Boost is a rather difficult affair. Boost recently accepted a futures library that had already been approved as part of the standard. However, getting into Boost wasn't a forgone conclusion. Another library recently did not make the cut. And although I think the criticisms are valid, I personally would be willing to use that library.
回答2:
There is a more modern version of Boost.Process (with incompatible changes) at
http://www.highscore.de/boost/gsoc2010/
http://www.highscore.de/boost/gsoc2010/process.zip
svn co http://svn.boost.org/svn/boost/sandbox/SOC/2010/process/boost
Although still not accepted to Boost, I use it a lot and works well for what I use it for. I am waiting to see this included in Boost one day.
UPDATE 2019: There is an accepted version of Boost.Process in Boost, but it incompatible with earlier versions mentioned above. https://www.boost.org/doc/libs/1_71_0/doc/html/process.html
See also: Where is Boost.Process?
来源:https://stackoverflow.com/questions/1065054/c-process-management