ITEM: DX5073L
Defunct child processes do not die
ENV:
AIX 4.2
C for AIX 3.1
DESC:
I have a sockets program that forks whenever a connection is made
to it. The problem with this program is that the child processes that
it creates become defunct when they finish and accumulate over time. The
only way I know to get rid of them is to kill the parent process and
restart it. To avoid having to do this, I would like to put this
program under the control of the inetd daemon, but I'm not sure how to
modify it to do this. Do you have a sample C or C++ program that runs
under inet control?
Thanks,
Response:
ENV:
AIX 4.2
PROBLEM:
see above
*ACTION TAKEN:
The objective I believe is to let the children exit without
informing the parent of its death. Thus no defunct
child process.
I suggest using the SA_NOCHLDWAIT flag to the
sigaction() function with SIGCHLD. If set, and
sig equals SIGCHLD, child processes of the calling processes
will not be transformed into zombie processes when they
terminate.
Note that this sigaction flag is only available on
AIX 4.2 and beyond.
*ACTION PLAN:
Thank you for using AIX SupportLine.
TEST CASE:
n/a
Support Line: Defunct child processes do not die ITEM: DX5073L
Dated: November 1997 Category: N/A
This HTML file was generated 99/06/24~13:30:15
Comments or suggestions?
Contact us