From: Jeff Denham <jdenham@brighttiger.com>
Subject: Re: Signals and defuct children
Date: 1998/04/28 [thread overview]
Message-ID: <3545E439.E65B33F6@brighttiger.com> (raw)
In-Reply-To: 6i2579$71h@news-central.tiac.net
J Grotto wrote:
> I have a piece of C code that uses the fucntion
>
> signal(SIGCHLD, SIG_IGN);
>
> Under many UNIX environments this allows forked child processes to terminate
> without requiring additional handling by the parent.
>
> Under Digital UNIX however the child processes remain defunct.
>
> What is the appropriate method for handling this?
>
> If I replace the signal function with the compatibility function
> bsd_signal() the code works as I would expect. How are these functions
> different in the way they handle child process termination.
You're seeing the original BSD behavior of signal(),
which has no effect on the zombification of child
processes. The cleanest way to get what you want is
to switch to sigaction() and specific SA_CLDNOWAIT
in the sa_flags field. This is equivalent to setting
SIGCHLD to SIG_IGN under the UNIX 95 enviroment (using
the c89 compiler).
See the sigaction(2) man page for more details.
__________________________________________________
Jeff Denham (jdenham@brighttiger.com)
Bright Tiger Technologies
SmartCluster� Software for Distributed Web Servers
http://www.brighttiger.com
125 Nagog Park
Acton, MA 01720
Phone: (978) 263-5455 x177
Fax: (978) 263-5547
prev parent reply other threads:[~1998-04-28 4:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-04-27 4:00 Signals and defuct children J Grotto
1998-04-28 4:00 ` Jeff Denham [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox