delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/06/12/17:36:28

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
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <BF35D9C143BCCC4EB63181B67C9320C83A9CB6@serv-075.icon-germany.local>
From: Heribert Dahms <heribert_dahms AT icon-scm DOT com>
To: cygwin AT cygwin DOT com
Subject: RE: More on passing file descriptors
Date: Wed, 12 Jun 2002 23:43:11 +0200
MIME-Version: 1.0

Hi,

I have an application developped under HP-UX according to APUE,
but I just send FDs (no other data). Are there important existing
apps needing to feed both down the same socket?
(sorry can't try it under cygwin in the near future due to ressources)

[resent since somebody managed to get me blacklisted]

Bye, Heribert (heribert_dahms AT icon-scm DOT com)

	-----Original Message-----
	From:	David E Euresti [SMTP:davie AT MIT DOT EDU]
	Sent:	Tuesday, June 11, 2002 17:29
	To:	cygwin AT cygwin DOT com
	Subject:	RE: More on passing file descriptors

	[Heribert]  [snip]

	Yes the second process will need to query the cygserver for the FD.
And
	actually the cygserver will also want to Duplicate the handle,
because
	process 1 will probably close the handle after it sends it.
	Process 2 however can only call the cygserver inside calls to
recvmsg.
	so pretend this happens.
	Process 1 - sends a 1 byte packet with an FD.
	Process 1 - sends another 1 byte packet with an FD
	Process 2 - reads a 2 byte message, and gets the FD from the
cygserver, it
	never calls recvmsg again because there's no more data.  And we're
left
	with one FD floating in the air.

	I suggest reading the semantics of passing file descriptors in Unix
in
	"Advanced Programming in the Unix environment".  This is assuming
that we
	want this to look like Unix.

	[Heribert]  [snip]


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