Subject: Problem: Exec seems to close all file handles
From: [email-masked] (Peter Mularski)

23 Jul 1998 03:13:11 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
To: "GNU-Win32 (E-mail)" <[email-masked]>

Hello,

I have been working with the execv() call in a cygwin32 application, and
have discovered that, when executing a non-cygwin32 app, apparently all the
IO channels are closed when the application is initialized. This is my
guess, but let me explain what I am trying to do. Incidentally, this problem
does not seem to occur in programs that have been compiled with the cygwin32
stuff (gcc, etc). Basically, I have used dup2 to copy some file handles to
sockets, so that the standard IO is redirected in/out of sockets. As soon as
the server (which performs this redirection) executes the new program with
execv(), the client (who is listening on the sockets) gets a message that
the socket has been closed, and exits. This does not happen with
applications that have been written with cygwin32, but it does happen with
anything else (ftp.exe for example). Does anyone know what Windows Console
apps do when they start up? I am running 19.1 on NT 4.0, with egcs 1.0.2 and
the latest coolview (July 18, I think). If anyone wants more information,
let me know. Thanks in advance for the help...

Peter Mularski

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".