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 Message-Id: <2.2.32.20020605224634.009468d8@43.134.39.225> X-Sender: toft AT 43 DOT 134 DOT 39 DOT 225 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Wed, 05 Jun 2002 15:46:34 -0700 To: cygwin AT cygwin DOT com From: Toft Subject: Socket inheritance problem across exec. Hello, I have a problem with keeping the redirecting of stdout to a socket accross an exec() call. I'm doing the following : - Create a socket connection. - Fork a child process - Use dup2 to redirect stdout to the socket - execle() the new process. I expect the new process to redirect stdout to the inherited socket. When I compile the program I'm exec'ing under cygwin this works well - the called program redirects stdout to the socket. When I compile the program I'm exec'ing with for instance a Borland compiler I get no output whatsoever after the exec. If I redirect stdout to a file, rather than a socket, both cases work fine. Is there any particular known problems with inheriting sockets over exec ? I checked - the FD_CLOEXEC flag is set correctly before the exec. I'm ran this on both 98 & 2000 with same results. I just upgraded to latest 1.3.10 release. Rolf -- 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/