X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <4AD5647C.4040209@gmail.com> Date: Wed, 14 Oct 2009 06:41:16 +0100 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Passing file descriptors over a socket References: <4AD55408 DOT 9070902 AT cwilson DOT fastmail DOT fm> In-Reply-To: <4AD55408.9070902@cwilson.fastmail.fm> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Charles Wilson wrote: > If not, what sort of "not" is it? (a) possible, but nobody has had the > time or inclination to implement (b) not possible on win32 (c) possible, > but REALLY hard -- case (a) on steroids. Well, there's going to be DuplicateHandle involved in it, to copy the underlying os handle into the new process, but that's going to be the trivially easy bit. The real *tricky* part is likely going to be marshalling the corresponding fhandler_* objects across process boundaries. That plus there will probably be some required support to handle these fds and how they interact across process groups, close-on-exec, fork and exec, etc., etc., - all the usual tricky areas. You probably should have had another option: (d) Who knows? Not me, I've never scoped it out and maybe nobody has - the obvious parts are easy to guess, but the unobvious parts are going to be where all the complications arise. cheers, DaveK -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple