Boost logo

Boost :

From: Goetz Isenmann (G.Isenmann_at_[hidden])
Date: 2006-08-17 03:09:08


> I think the email to which you're replying must have gone astray
> -- at least I can't find it in my email client or in the list archive.
> Can you post the whole problem again, thanks.

Hello Chris!

I have sent the following message only to you (got a delivery failure)
and Martin.

On Wed, Aug 16, 2006 at 08:23:00PM +1000, Martin Slater wrote:
>
> >Was it anonymous or named pipes you were thinking of? Anonymous
> >pipes in particular look like easy pickings on both UNIX and
> >Win32, so I could add them once I get the TR2 proposal out of
> >the way.

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

> Both of them ;-) Ideally I would be able to attach an existing OS pipe
> handle as well so I could use it for reading output from std streams of
> a child process, i'm ignorant of the issues on unix like systems for
> this behaviour though. Currently I'm using sockets instead of pipes for
> local interprocess connections anyway so I can still use asio and can
> live with this for a while so I'm more than happy to wait until you have
> time;)

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".

But I would be glad to hear, that it will work, and that I have to
only find out what I did wrong.

-- 
Goetz Isenmann

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