Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Delivered-To: mailing list cygwin@cygwin.com Message-ID: <3C8F88DA.C965DD64@axlog.fr> Date: Wed, 13 Mar 2002 17:14:02 +0000 From: Stephane Corbe X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 sun4u) X-Accept-Language: fr, en MIME-Version: 1.0 To: cygwin@cygwin.com Subject: dll call and fork References: <20020313150621.S29574@cygbert.vinschen.de> <20020313163641.W29574@cygbert.vinschen.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello, If I fork my programm, the child died when it call a function in a DLL. (Cygwin 1.3.10-1 on NT4) void dll_call(int i) { printf("in dll_call %d\n", i); } ... printf("begin"); switch (pid=fork()) { case 0 : printf("child is alive\n"); dll_call(pid); printf("after dll_call\n"); break; case -1 : printf ("fork error\n"); break; default: printf ("parent is alive\n"); dll_call(pid); while (1); // or sleep; gets, ... same result } Output is : begin child_is_alive parent is alive in dll_call 0 /* nothing else */ Did you see this before ? Stephane -- 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/