[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: passfd on more platforms

From: Bastien ROUCARIES
Subject: Re: passfd on more platforms
Date: Mon, 14 Mar 2011 14:36:58 +0100

On Mon, Mar 14, 2011 at 2:20 PM, Paolo Bonzini <address@hidden> wrote:
> On 03/14/2011 12:38 AM, Bruno Haible wrote:
>> On mingw, I haven't even tried the module. It first requires
>>   - a 'socketpair' module for the test,
>>   - to rewrite the test to use the 'execute' module instead of fork().
> MinGW would need a total rewrite.  The Win32 API requires you to duplicate
> the handle in the context of the sending process, and send the new handle
> somehow to the receiving process.  For example you can get information on
> the socket using gethostname (getpeername on the other side), create a named
> pipe based on the name, and send the handle on the named pipe.

Or you could ask throught the socket, the process id of the receiving
process than send the handle.

It is assumed that the two sides have coordinated and agreed to
transfer a file descriptor already, so that the sendfd is met with a
recvfd instead of an ordinary read.


> It probably could fit within the sendfd/recvfd API, at least.
> Paolo

reply via email to

[Prev in Thread] Current Thread [Next in Thread]