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: <5.1.0.14.0.20020605185222.01f98630@pop.ma.ultranet.com> X-Sender: lhall AT pop DOT ma DOT ultranet DOT com Date: Wed, 05 Jun 2002 18:56:18 -0400 To: Toft , cygwin AT cygwin DOT com From: "Larry Hall (RFK Partners, Inc)" Subject: Re: Socket inheritance problem across exec. In-Reply-To: <2.2.32.20020605224634.009468d8@43.134.39.225> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 06:46 PM 6/5/2002, Toft wrote: > 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. POSIX functionality comes from the Cygwin DLL. If the program you exec() doesn't link to Cygwin, Cygwin isn't going to be able to provide the functionality you seek. So, your best choice is to stick with Cygwin all the way. If this isn't possible for some reason, then you need to provide the support for the socket functionality you need. Obviously, this would then be a problem which is not related to Cygwin so it would be off-topic for this list. Larry Hall lhall AT rfk DOT com RFK Partners, Inc. http://www.rfk.com 838 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- 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/