Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Date: Mon, 13 May 2002 13:08:13 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Socket Handles duplicated twice after fork Message-ID: <20020513130813.C6264@cygbert.vinschen.de> Mail-Followup-To: cygwin AT cygwin DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.22.1i On Wed, May 08, 2002 at 11:42:54AM -0400, David E Euresti wrote: > #include > #include > #include > #include > > int main() { > int fds[2]; > int pid; > > socketpair (AF_UNIX, SOCK_STREAM, 0, fds); > > pid = fork (); > if (pid == 0) { > printf("Child: Sockets are 0x%x 0x%x\n", > get_osfhandle(fds[0]), get_osfhandle(fds[1])); > sleep(300); > } > else { > printf("Parent: Sockets are 0x%x 0x%x\n", > get_osfhandle(fds[0]), get_osfhandle(fds[1])); > sleep(300); > } > } Could you please send an `strace -f' output running the above code to the list? Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT 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/