Re: No child processes - system limit? shows a way to recreate the problem which it attributes to: Normally, you'd get this error (ECHILD) if you wait for a child, but there is no child
Also, from the source of IPC::System::Simple (sub capturex() called by capture()):
# This next line also does an implicit fork. my $pid = open(my $pipe, '-|'); ## no critic if (not defined $pid) { croak sprintf(FAIL_START, $command, $!); } elsif (not $pid) { # Child process, execs command.
So there is an implicit fork there expectedly. Additional to all your other forks.
So I would follow dave_the_m's suggestion Re: "No child processes" problem with fork() call and check if fork() does succeed before waiting for that child. fork() may fail when a maximum number of children has been reached according to the OS.
In reply to Re^2: "No child processes" problem with fork() call
by bliako
in thread "No child processes" problem with fork() call
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |