This is the mail archive of the
mailing list for the Cygwin project.
Re: Descriptor passing between process
- From: egor duda <deo at logos-m dot ru>
- To: "Christophe LEITIENNE" <cleitienne at wanadoo dot fr>
- Cc: cygwin at cygwin dot com
- Date: Wed, 23 Jan 2002 13:17:26 +0300
- Subject: Re: Descriptor passing between process
- Organization: deo
- References: <002401c1a3f4$0b77e8c0$010310ac@lyoncleitienne>
- Reply-to: egor duda <cygwin at cygwin dot com>
Wednesday, 23 January, 2002 Christophe LEITIENNE firstname.lastname@example.org wrote:
CL> I'm using Cygwin 1.3.8 on a Windows 2000 box.
CL> I'm looking for a way to pass a socket descriptor between 2 process, using
CL> sendmsg and recvmsg on a unix named pipe. This procedure seems to be well
CL> knowned and works well on Linux and AIX.
CL> I didn't found anything interesting about it in the mailing list archives,
CL> except someone who started to port this API to Cygwin some time ago, without
CL> any further informations.
CL> am I doing something wrong ?
no. this feature currently is not supported.
CL> Will this API be ported to Cygwin in a near future ?
probably. when/if cygwin daemon will be tested and included into main
sources. daemon issue had been discussed to death in cygwin-developers@
mailing list, you can look in archives if you're interested. Rob
Collins created and is maintaining a separate cygwin_daemon branch in
original "cygwin daemon" (called "cygwin server" then) motivation was
exactly what you're asking about -- providing a secure way to pass
handles between possibly unrelated processes.
CL> Is there a way to pass descriptors between process in an other way with
CL> Cygwin ?
for now, the only way to do it is normal parent/child descriptor
CL> Is it possible to simulate this using the win32 DuplicateHandle and
CL> cygwin_attach_handle_to_fd (and probably with cygwin_attach_fd_to_handle
CL> which does not exists) ?
the problem with DuplicateHandle is that you have to obtain a handle
of other process. this is not always possible, for security reasons.
Egor. mailto:email@example.com ICQ 5165414 FidoNet 2:5020/496.19
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html