$SIG{CHLD} = 'IGNORE'; # ignore dead children, to avoid zombie processes my $child = fork(); if ($child) { # parent; return data $self->return_data( { data => $data } ); } else { # child; run external process my $child_output; eval { # gather a whole lot of data; assemble $external_command use IPC::System::Simple 'capture'; $child_output = capture($external_command); }; $self->log("Error when running [$external_command]: $child_output") if $child_output; $self->log("Error when running [$external_command]: $@") if $@; CORE::exit(0); } #### Error when running [{external command}]: "{external command}" failed to start: "No child processes" at /path/to/web/program.pm line 459.