From owner-freebsd-questions Tue Feb 17 08:34:54 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA21740 for freebsd-questions-outgoing; Tue, 17 Feb 1998 08:34:54 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from hub.kbsu.ru ([195.209.253.4]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA21643 for ; Tue, 17 Feb 1998 08:33:33 -0800 (PST) (envelope-from vel@hub.kbsu.ru) Received: (from vel@localhost) by hub.kbsu.ru (8.8.7/8.8.5) id TAA01302 for questions@freebsd.org; Tue, 17 Feb 1998 19:35:07 +0300 (MSK) From: Charlie Message-Id: <199802171635.TAA01302@hub.kbsu.ru> Subject: Zombie processes To: questions@FreeBSD.ORG Date: Tue, 17 Feb 1998 19:35:07 +0300 (MSK) Reply-To: vel@ns.kbsu.ru X-Mailer: ELM [version 2.4ME+ PL22 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello ! I have a small trouble with my program under FreeBSD. I do fork() to create new process, and new process must do something and exit, but parent process must continue. The simplest program looks like this: #include #include main() { if (!fork()) { printf("This is child, exiting ...\n"); return; } while(1); } The created child process must write message and exit, but it doesn't exit correctly. It hangs like "zombie" process until parent process exits. Why it happens ? Is there any way to solve or walk around this problem ? Pre-thanx. Eugene L. Vorokov, Kabardino-Balkarian State University, Russia vel@hub.kbsu.ru or vel@ns.kbsu.ru To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message