|
Boost : |
Subject: Re: [boost] [gsoc] Boost.Process done
From: Ilya Sokolov (ilyasokol_at_[hidden])
Date: 2010-08-21 09:59:36
On 21.08.2010 17:13, Boris Schaeling wrote:
> On Thu, 19 Aug 2010 23:58:08 +0200, Ilya Sokolov <ilyasokol_at_[hidden]>
> wrote:
>>
>> 1. Before creating any new file (such as in bpb::pipe::create()
>> or bpb::dummy::create(), not sure about bpb::inherit::create()), you
>> could "occupy" fds which behavior has been set to != bpb::inherit.
>
> Then a behavior class would somehow need to know what another behavior
> class has been doing? The constructors of the behavior classes would
> need access to the context object to check the other stream behaviors?
Not necessarily. create_child() could do all the job.
In fact, it does in all other drafts.
>> 2. Create new files in the ascending order of the corresponding fds.
>
> This would then be the responsibility of the library user
> (stdout_behavior would need to be set before stderr_behavior for example)?
See above.
>>
> [snip]
>
>>> By the way, I wonder if Boost.Test likes a test case which closes all
>>> file descriptors? It would be nice if this could be added as a test
>>> case.
>>
>> You could dup std descriptors to some upper fds before the test and dup
>> them back after the test.
>
> I will try this and hope Boost.Test doesn't use any other file
> descriptors. :-)
)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk