From 8f713cfcba3aac6427424975f6d4595edbe17f28 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 Content-Type: text/plain; charset=utf-8 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 --- 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 e7e9954..f353abd 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, -- 1.7.10.4