https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20342 --- Comment #21 from David Cook <dcook@prosentient.com.au> --- The more I think about it... the more I can't see this ever working with a persistent process. The only reason it works with CGI is because the parent process is not persistent / is short lived. -- In theory, if $SIG{CHLD} were set to IGNORE rather than DEFAULT, then we possibly wouldn't get zombie processes, but that would need to be set at a higher level than stage-marc-import.pl I reckon, plus it's not a brilliant idea, as it would have wider consequences. -- Looking at https://metacpan.org/pod/CGI::Compile#exit-and-exceptions, I see that exit() isn't a real exit as well... makes sense. If we use CORE::exit(0) instead of exit(0), it actually exits the background child process, although we still wind up with the zombie process like so: kohadev+ 69925 69922 10 00:49 ? 00:00:03 starman worker -M FindBin --max-requests 50 --workers 2 --user=kohadev-koha --group kohadev-koha --pid /var/run/koha/kohadev/plack.pid --daemonize --access-log /var/log/koha/kohadev/plack.l og --error-log /var/log/koha/kohadev/plack-error.log -E development --socket /var/run/koha/kohadev/plack.sock /etc/koha/sites/kohadev/plack.psgi kohadev+ 69999 69925 17 00:50 ? 00:00:03 [starman worker ] <defunct> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.