Boost logo

Boost :

Subject: Re: [boost] [gsoc] Boost.Process done
From: Wolfgang Fertsak (wolfgang.fertsak_at_[hidden])
Date: 2010-09-01 05:17:44

On 01.09.2010 01:03, Boris Schaeling wrote:
>[...] In fact in previous Boost.Process drafts
> standard streams were not inherited but closed - but then POSIX
> developers complain again as they expect inheritance. Wolfgang proposed
> to add another constructor. In order to avoid that Windows applications
> accidentally use the default constructor we could also provide only one
> constructor with three required parameters to set stream behaviors? Or
> another idea: Boost.Process does whatever developers expect on a
> platform (inherit on POSIX, nothing on Windows)?

I think the current implementation can cause problems on POSIX too. When
an executables closes its stdin/out/err file descriptors (e.g. a demon),
inheriting these handles will also fail (and I guess exceptions will be
So regardless of what the default behavior is, POSIX and Windows
developers should be able to change it.
IMO another constructor with the 3 parameters for the stream behaviours
would do. The documentation should state clearly that the default
behavior is inheritance and will fail if the application has no console
or its stdin/out/err file descriptors have been closed.
But that's just my 5 cents...other opinions/ideas would be nice.


Boost list run by bdawes at, gregod at, cpdaniel at, john at