in reply to fork() and wiatpid() quirk on RHEL AS 4 and PERL version 5.8.5

How much time passes between the moment one of your child processes exits and when it is reaped? If they are not reaped in a timely manner, they will fill up the process table with defunct zombies. Have you tried this instead:

$SIG{CHLD} = sub { wait() }

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)
  • Comment on Re: fork() and wiatpid() quirk on RHEL AS 4 and PERL version 5.8.5
  • Download Code

Replies are listed 'Best First'.
Re^2: fork() and wiatpid() quirk on RHEL AS 4 and PERL version 5.8.5
by JavaFan (Canon) on Jan 15, 2009 at 18:48 UTC
    Or even:
    $SIG{CHLD} = 'IGNORE'; # Children are automatically reaped.
      Thanks for your advice. I will test this and report the result.
      Your advice was spot on and resolved the issue. Thank you!