Boost logo

Boost :

Subject: Re: [boost] [gsoc] Boost.Process done
From: Boris Schaeling (boris_at_[hidden])
Date: 2010-08-24 17:05:40

On Tue, 24 Aug 2010 08:43:46 +0200, Ilya Sokolov <ilyasokol_at_[hidden]>

> On 23.08.2010 23:48, Boris Schaeling wrote:
> [...]
>>> Do you really need to call ConnectNamedPipe() at stream_behavior.hpp,
>>> line 258? AFAICS, at that time the client's end of pipe is opened
>>> already, so there is no need to wait for it.
>> If I remember correctly ConnectNamedPipe() is called to make sure that
>> both ends are connected before the constructor of
>> boost::process::behavior::named_pipe returns. As CreateFileA() is called
>> with FILE_FLAG_OVERLAPPED this function could return immediately
> It couldn't because it returns "... an open handle to the specified
> file, device, named pipe, or mail slot ..."

I commented out the code and ran the relevant test cases a couple of times
on Windows - they were all passed successfully. I don't know whether I
misinterpreted anything on MSDN and thought that because of passing
FILE_FLAG_OVERLAPPED to CreateFile() this function could also return
immediately. I guess it's then safe to remove the call to
ConnectNamedPipe() (if not we simply revert to the old version in
Subversion :-).


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