Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Thu, 24 Jan 2002 17:01:47 +0100
From: Corinna Vinschen <cygwin@cygwin.com>
To: cygwin <cygwin@cygwin.com>
Subject: Re: Descriptor passing between process
Message-ID: <20020124170147.D11608@cygbert.vinschen.de>
Mail-Followup-To: cygwin <cygwin@cygwin.com>
References: <002401c1a3f4$0b77e8c0$010310ac@lyoncleitienne> <20020123120701.A11608@cygbert.vinschen.de> <8181418335.20020124161420@logos-m.ru> <20020124142156.Y11608@cygbert.vinschen.de> <4183271981.20020124164513@logos-m.ru> <20020124163840.B11608@cygbert.vinschen.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20020124163840.B11608@cygbert.vinschen.de>
User-Agent: Mutt/1.3.22.1i

On Thu, Jan 24, 2002 at 04:38:40PM +0100, Corinna Vinschen wrote:
> On Thu, Jan 24, 2002 at 04:45:13PM +0300, Egor Duda wrote:
> > Hi!
> > 
> > Thursday, 24 January, 2002 Corinna Vinschen cygwin@cygwin.com wrote:
> > 
> > CV> On Thu, Jan 24, 2002 at 04:14:20PM +0300, Egor Duda wrote:
> > >> CV> It's part of the API since 1.3.8-1.
> > >> 
> > >> Hmm. What change are you referring to? I don't see anything like this
> > >> in the ChangeLog.
> > 
> > CV> 2002-01-19  Mark Bradshaw  <bradshaw@staff.crosswalk.com>
> > 
> > CV>         * cygwin.din: Add recvmsg and sendmsg.
> > CV>         * net.cc: Add cygwin_recvmsg and cygwin_sendmsg.
> > CV>         * /usr/include/sys/socket.h: Add recvmsg and sendmsg.
> > 
> > yes, but if i understand things correctly, Christophe was talking
> > about passing file descriptors between processes by means of AF_UNIX
> > sockets. btw, "Subject:" implies this :).
> > 
> > this is done on unices via msg_control (or msg_accrights) field in msg
> > structure. and unices ensure that the process which receives the
> > message using recvmsg can use the descriptor for all kinds of file
> > operations. in the case of cygwin, the receiver may get the value 3 in
> > message packet, but won't be able to use it in "read (3, buf, sizeof (buf))"
> 
> Ouch.  I didn't read your message correctly before sending the
> reply to Christophe's mail.

More ouch!  I just read a detailed description of the descriptor
passing magic via AF_LOCAL sockets in U*X systems. I see now that
I didn't even know what you were talking about.

It *could* be implemented.  

First we would have to implement the control message passing at all and
when it's available we could perhaps even implement descriptor passing
using the DuplicateHandle() function.

Volunteers?

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
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/

