This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: More on passing file descriptors


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@icon-scm.com)

	-----Original Message-----
	From:	David E Euresti [SMTP:davie@MIT.EDU]
	Sent:	Tuesday, June 11, 2002 17:29
	To:	cygwin@cygwin.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]