Date: Thu, 23 Dec 1999 16:42:54 +0900 From: =?ks_c_5601-1987?B?sei8ur/s?= <success@ecoin.co.kr> To: <freebsd-questions@FreeBSD.ORG> Subject: defunct problem Message-ID: <000c01bf4d19$538ffe10$31977ed2@george>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hello.
I am programming on FreeBSD, and I meet a defunct problem.
I'm using C language and the function using on my program is just fork().
When the child is terminated normally, the child does not disappear and remains as defunct.
Of course, I set a signal as the following.
signal( SIGIO, SIG_DFL ); /* For select( ) */
signal( SIGCHLD, SIG_IGN ); /* For prohibition of defunct */
and my signal handler is,
void sighandler(int sig)
{
sighold(sig);
LOG("signal %d received",sig);
if (sig == SIGPIPE)
{
Terminate();
kill(getpid(),SIGKILL);
}
if (sig == 18)
signal(18,SIG_IGN);
else
Terminate();
sigrelse(sig);
}
My program was normally run on Solaris 2.5, 2.6, Digital UNIX OSF1 V.4 and linux 6.0.
I just hope to know how to handle a defunct problem on FreeBSD.
I'll wait your quick reply.
Thank you.
Sincerely yours,
Kim, Sung Woo
success@ecoin.co.kr
[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=ks_c_5601-1987" http-equiv=Content-Type>
<META content="MSHTML 5.00.2314.1000" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hello.</FONT></DIV>
<DIV><FONT size=2>I am programming on FreeBSD, and I meet a defunct
problem.</FONT></DIV>
<DIV><FONT size=2>I'm using C language and the function using on my program is
just fork().</FONT></DIV>
<DIV><FONT size=2>When the child is terminated normally, the child does not
disappear and remains as defunct.</FONT></DIV>
<DIV><FONT size=2>Of course, I set a signal as the following.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> signal(
SIGIO, SIG_DFL ); /* For select( )
*/<BR> signal( SIGCHLD, SIG_IGN ); /*
For prohibition of defunct */<BR></FONT></DIV>
<DIV><FONT size=2>and my signal handler is,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>void sighandler(int sig)<BR>{<BR>
sighold(sig);<BR> LOG("signal %d
received",sig);<BR> if (sig == SIGPIPE)<BR>
{<BR>
Terminate();<BR>
kill(getpid(),SIGKILL);<BR> }<BR> if (sig ==
18)<BR>
signal(18,SIG_IGN);<BR> else<BR>
Terminate();<BR>
sigrelse(sig);<BR>}<BR></FONT></DIV>
<DIV><FONT size=2>My program was normally run on Solaris 2.5, 2.6, Digital
UNIX OSF1 V.4 and linux 6.0.</FONT></DIV>
<DIV><FONT size=2>I just hope to know how to handle a defunct problem on
FreeBSD.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I'll wait your quick reply.</FONT></DIV>
<DIV><FONT size=2>Thank you.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Sincerely yours,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Kim, Sung Woo</FONT></DIV>
<DIV><FONT size=2><A
href="mailto:email : success@ecoin.co.kr">success@ecoin.co.kr</A></FONT></DIV>
<DIV><FONT size=2> </DIV></FONT></BODY></HTML>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000c01bf4d19$538ffe10$31977ed2>
