Boost logo

Boost :

Subject: Re: [boost] [gsoc] Boost.Process done
From: Wolfgang Fertsak (wolfgang.fertsak_at_[hidden])
Date: 2010-08-31 10:37:26


On 31.08.2010 15:08, Jeff Flinn wrote:
> [...]
> I initially tried using the provided dummy behavior, which is a misnomer
> since it actually created temporary files and streams. I was an
> unhandled win32 exception when shutting down.
>
> The funny thing is there is already a context::setup method that would -
> at least on windows - allow the stream behavior to be fully
> encapsulated. A context could set the handle members of STARTUPINFOA
> only instantiating those boost::process::behavior::streams that are
> needed. On posix, setup could do all of the dup'ing of filenumbers, as
> it's called between fork and execve already.
>
> I've got a feeling there is a much better design lurking in the existing
> one, that would give a much more natural abstraction of the
> posix/windows requirements.

Thanks for the tip with the custom context class!
(I think class null in your example is not neccessary because you could
use boost::process::behavior::stream::create()
directly instead).
IMO it would be nice if the library provided some support for our
problem, e.g. by an additional constructor for the context class where
you can explicitly specify values for each of the members (perhaps with
default arguments).

Best regards,
Wolfgang


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk