Boost logo

Boost :

From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2006-08-17 03:42:38


Hi Goetz,

Goetz Isenmann <G.Isenmann_at_[hidden]> wrote:
> I have sent the following message only to you (got a delivery
> failure) and Martin.

Ah ok, thanks for resending.

> AFAIK only named pipes can be used/opened for win32 overlapped
> i/o.

In the entry for CreatePipe, MSDN says:

  Anonymous pipes are implemented using a named pipe with a
  unique name. Therefore, you can often pass a handle to an
  anonymous pipe to a function that requires a handle to a named
  pipe.

I haven't tried it, however.

> Is it possible to inherit sockets as stdin/out/err Handles for
> CreateProcess? I tried to write a small testcase yesterday,
> that
> 1. creates a connected socket pair,
> 2. derives a inheritable handle (DuplicateHandle) from the
> first socket,
> 3. closes the first socket,
> 4. creates a child process with the handle as stdout handle,
> 5. closes the handle, and
> 6. reads from the second socket.
>
> The read failed with WSAECONNRESET, which I take as "will not
> work".

Yeah, I don't know the answer, sorry. You might try not closing
the socket handles and see if that makes a difference.

Cheers,
Chris


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