bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH 2/3] sendfd, recvf pass file descriptors along Unix domain so


From: Bastien ROUCARIES
Subject: Re: [PATCH 2/3] sendfd, recvf pass file descriptors along Unix domain sockets
Date: Wed, 2 Feb 2011 17:06:09 +0100
User-agent: KMail/1.13.5 (Linux/2.6.36reiser; KDE/4.4.5; x86_64; ; )

Le mercredi 2 février 2011 16:45:08, Eric Blake a écrit :
> On 02/02/2011 07:33 AM, Bastien ROUCARIES wrote:
> > Recvfd and sendfd can be used to pass an open file descriptor over a Unix
> > domain socket from one process to another.
> 
> Not on cygwin.  I don't know of any way that you can port this to
> cygwin, which means use of this module inherently restricts your
> portability.
I have seen some code on the net using DuplicateHandle() [or 
WSADuplicateSocket()].

Reading fhandler_socket.cc it seems that it is possible from an AF_LOCAL socket 
to get the pid of the sending process, and thus to 
use the DuplicateHandle() stuff.

In all the case, under woe32 the know the path, or we could use ZwCreateFile.

Bastien



reply via email to

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