delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/23/05:19:41

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Wed, 23 Jan 2002 13:17:26 +0300
From: egor duda <deo AT logos-m DOT ru>
X-Mailer: The Bat! (v1.53 RC/4)
Reply-To: egor duda <cygwin AT cygwin DOT com>
Organization: deo
X-Priority: 3 (Normal)
Message-ID: <4984406349.20020123131726@logos-m.ru>
To: "Christophe LEITIENNE" <cleitienne AT wanadoo DOT fr>
CC: cygwin AT cygwin DOT com
Subject: Re: Descriptor passing between process
In-Reply-To: <002401c1a3f4$0b77e8c0$010310ac@lyoncleitienne>
References: <002401c1a3f4$0b77e8c0$010310ac AT lyoncleitienne>
MIME-Version: 1.0

Hi!

Wednesday, 23 January, 2002 Christophe LEITIENNE cleitienne AT wanadoo DOT fr 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
CVS.

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

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:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019