This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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                    
RFK Partners, Inc.            
838 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]