Date: Tue, 17 Feb 1998 19:35:07 +0300 (MSK) From: Charlie <vel@hub.kbsu.ru> To: questions@FreeBSD.ORG Subject: Zombie processes Message-ID: <199802171635.TAA01302@hub.kbsu.ru>
next in thread | raw e-mail | index | archive | help
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 <stdio.h>
#include <unistd.h>
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802171635.TAA01302>
