From: pmularski AT clariion DOT com (Peter Mularski) Subject: Problem: Exec seems to close all file handles 23 Jul 1998 03:13:11 -0700 Message-ID: <000801bdb5ad$9192ab40$732ddd80.cygnus.gnu-win32@cpc45115.us.dg.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit To: "GNU-Win32 (E-mail)" 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 "gnu-win32-request AT cygnus DOT com" with one line of text: "help".