
Hello all, I was asking if there is CreateProcess like functionailty in Boost. In our application we lock files, and spawn a process (thru _spawn). However it seems that m$ implemented in this way that handles are inherited by child process. This means that the child process is also getting the handle of the locked file, preventing the main application to write to this locked file. So I was wondering if there is a portable c++ way to create prcoesses. Otheriwse we have to write it ourselves and spying the sources of m$ it seems that parsing the commandline is not trivial.

Boost.Process might be what you need. It's still in working but almost
finished, you can try it :
http://svn.boost.org/svn/boost/sandbox/SOC/2010/process/
http://www.highscore.de/boost/gsoc2010/process.zip
On Thu, Sep 23, 2010 at 11:50, gast128
Hello all,
I was asking if there is CreateProcess like functionailty in Boost.
In our application we lock files, and spawn a process (thru _spawn). However it seems that m$ implemented in this way that handles are inherited by child process. This means that the child process is also getting the handle of the locked file, preventing the main application to write to this locked file.
So I was wondering if there is a portable c++ way to create prcoesses. Otheriwse we have to write it ourselves and spying the sources of m$ it seems that parsing the commandline is not trivial.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

2010/9/23 Klaim
Boost.Process might be what you need. It's still in working but almost finished, you can try it : http://svn.boost.org/svn/boost/sandbox/SOC/2010/process/ http://www.highscore.de/boost/gsoc2010/process.zip
The API described in: http://www.highscore.de/boost/gsoc2010/ is inconsistent with what it really gives. And I can't compile even the example wtih MinGW on Win XP. I'm not sure the API there is out-dated or just planned to do?

The links I provided are the last release, that documentation have not be
generated yet (and maybe not even been updated, I'm not sure).
You can still see the usage by looking at the examples.
I don't know (yet) how to generate the documentation, I'm searching right
now.
On Thu, Sep 23, 2010 at 16:53, TONGARI
2010/9/23 Klaim
Boost.Process might be what you need. It's still in working but almost
finished, you can try it : http://svn.boost.org/svn/boost/sandbox/SOC/2010/process/ http://www.highscore.de/boost/gsoc2010/process.zip
The API described in:
http://www.highscore.de/boost/gsoc2010/ is inconsistent with what it really gives. And I can't compile even the example wtih MinGW on Win XP.
I'm not sure the API there is out-dated or just planned to do?
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

On Thu, 23 Sep 2010 16:53:47 +0200, TONGARI
2010/9/23 Klaim
Boost.Process might be what you need. It's still in working but almost finished, you can try it : http://svn.boost.org/svn/boost/sandbox/SOC/2010/process/ http://www.highscore.de/boost/gsoc2010/process.zip
The API described in: http://www.highscore.de/boost/gsoc2010/ is inconsistent with what it really gives. And I can't compile even the example wtih MinGW on Win XP.
I'm not sure the API there is out-dated or just planned to do?
Boost.Process is heavily discussed on the developer mailing list (since 15 August) and was updated a few times. The documentation was not updated though (this will be done once discussions end and the API is stable again; otherwise the documentation would need to be updated all the time, too). It looks like we are nearly there though (there was another major update on Sunday - now only some details are left and need to be changed). Here's the thread if you are interested (and have lots of time ;): http://thread.gmane.org/gmane.comp.lib.boost.devel/207594 Boris

Hello,
2010/9/23 Boris Schaeling
On Thu, 23 Sep 2010 16:53:47 +0200, TONGARI
wrote: 2010/9/23 Klaim
Boost.Process might be what you need. It's still in working but almost finished, you can try it : http://svn.boost.org/svn/boost/sandbox/SOC/2010/process/ http://www.highscore.de/boost/gsoc2010/process.zip
Boost.Process is heavily discussed on the developer mailing list (since 15 August) and was updated a few times. The documentation was not updated though (this will be done once discussions end and the API is stable again; otherwise the documentation would need to be updated all the time, too). It looks like we are nearly there though (there was another major update on Sunday - now only some details are left and need to be changed). Here's the thread if you are interested (and have lots of time ;): http://thread.gmane.org/gmane.comp.lib.boost.devel/207594
That's great news! A lot of work has been done since already a few years. I have one comment (though did not read the whole dev thread!) pistream v/s postream: I would use different names for those. Usually, we call those streams standard input and output. I would say the stdin of the child should be called pistream, even from the parent's point of view. Another solution would be to call those "source" and "sink", such as psrcstream and psinkstream. Best regards, -- Alexandre Quessy http://alexandre.quessy.net/
participants (5)
-
Alexandre Quessy
-
Boris Schaeling
-
gast128
-
Klaim
-
TONGARI