From 3e541866cdd00389dc3f28a401911ebd4f5699e9 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 8 Jul 2016 08:34:00 +0200 Subject: [PATCH] Bug 10407: Resolve warnings from child process After the staging job finishes, the child tries to print results to STDOUT (which is closed). This creates warnings like: stage-marc-import.pl: binmode() on closed filehandle STDOUT at C4/Templates.pm line 120. stage-marc-import.pl: Filehandle STDOUT reopened as FH only for input at /usr/lib/perl5/Template/Provider.pm line 964. Resolving it is simple: the child should exit after marking the job as finished. Test plan: Import a marc file. Observe that you do no longer have such warnings. Signed-off-by: Marcel de Rooy Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- tools/stage-marc-import.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/stage-marc-import.pl b/tools/stage-marc-import.pl index e7e9954308..f353abd39e 100755 --- a/tools/stage-marc-import.pl +++ b/tools/stage-marc-import.pl @@ -175,6 +175,7 @@ if ($completedJobID) { }; if ($runinbackground) { $job->finish($results); + exit 0; } else { $template->param(staged => $num_valid, matched => $num_with_matches, -- 2.39.5