This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Socket inheritance problem across exec.
- From: "Larry Hall (RFK Partners, Inc)" <lhall at rfk dot com>
- To: Toft <toft at itvd dot sel dot sony dot com>, cygwin at cygwin dot com
- Date: Wed, 05 Jun 2002 18:56:18 -0400
- Subject: Re: Socket inheritance problem across exec.
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@rfk.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/