From: Serguei DOT Dachian AT univ-lemans DOT fr (Serguei DACHIAN) Subject: fork and V and socket and Gnu-win32 16 Jun 1998 18:44:39 -0700 Message-ID: <1.5.4.32.19980616103747.0067d2ec.cygnus.gnu-win32@lola.univ-lemans.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: gnu-win32 AT cygnus DOT com Hi everybody. I have some very peculiar problem, and i would really appreciate any HELP. I am using B19 + Sergey's coolview + EGCS + Gui library V (version 1.19). My program has a simple GUI with two buttons "Start" and "Stop". The "Start" button forks some child process which is an infinite loop working with sockets. And the stop button just kill this child process. The problem is the following: the child process dies dumping core immediatly after it is forked. It occures really only in the setup "fork + V + socket + Gnu-win32" since it works well under Linux, it works well if the child process don't use sockets and it works well if I don't fork and use sockets in the parent process. If any one can understand what's going on it will be great. If it can help, here is a simplified fragment from my "WindowCommand" function --------- BEGIN -------- case btnStartTool: { if ((childpid = fork()) < 0) { MyError("Fork failed."); } else { if (childpid == 0) { while(1) { XXXXXX(); } } else { YYYYYY(); } } break; } case btnStopTool: { kill(childpid,SIGKILL); ZZZZZZ(); break; } --------- BEGIN -------- Here XXXXXX() is some function using sockets. The functions YYYYYY() and ZZZZZZ() deals with V interface and as to my mind are used only by parent; hence shey should not be important. Thaks in advance for any help. ___________________________________________________________________________ Serguei DACHIAN Laboratoire de Statistique et Processus, Universite du Maine, Av. Olivier Messiaen 72085 Le Mans CEDEX 9, FRANCE Tel. : +33 (0)2 43 83 37 18 Fax. : +33 (0)2 43 83 35 79 Email : Serguei DOT Dachian AT univ-lemans DOT fr WWW : http://www.univ-lemans.fr/sciences/statist/cvs/thesard.html#dachian - 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".