*BSD News Article 39140


Return to BSD News archive

Xref: sserve comp.sys.sun.misc:16573 comp.unix.bsd:15492 alt.sys.sun:8980 comp.unix.programmer:22044
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msunews!uwm.edu!news.alpha.net!news.mathworks.com!zombie.ncsc.mil!news.duke.edu!concert!ashe.cs.unc.edu!not-for-mail
From: mirchand@cs.unc.edu (Jaideep Mirchandani)
Newsgroups: comp.sys.sun.misc,comp.unix.bsd,alt.sys.sun,comp.unix.programmer
Subject: SIGCHLD not being handled properly: defuncts
Followup-To: poster
Date: 8 Dec 1994 17:17:51 -0500
Organization: The University of North Carolina
Lines: 24
Message-ID: <3c80mf$svt@mozart.cs.unc.edu>
NNTP-Posting-Host: mozart.cs.unc.edu
Keywords: SIGCHLD, defunct processes

Greetings,
I am trying the following on a server running under SunOS 4.1.3:
specify a signal handler (e.g. sig_child()) for SIGCHLD using sigaction()
forks


sig_child)( does a 
    while ( (pid = wait3(&StatusLocation,  WNOHANG | WUNTRACED,
ResourceUsageP)) > 0 )
      ;

The Problem:
I still see defunct processes ure of the defuncts. 
What's more, I don't stop in sig_child() of the parent under a debugger.
Thus, it appears that the handler wasn't invoked. But this couldn't
always be true because sometimes, the defuncts don't exist. Evidently,
there
is a very delicate timing issue involved.

Any ideas ? 


Thanks for reading this,
Jaideep