Bug 10407: Resolve warnings from child process
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 8 Jul 2016 06:34:00 +0000 (08:34 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 2 Sep 2016 16:00:13 +0000 (16:00 +0000)
commit3e541866cdd00389dc3f28a401911ebd4f5699e9
treea816adf803ca2652c1513f471282ee97b7f9ea1c
parentaa5bf4d3cc0e4d57b958e665ad1c6efa8a76a9fb
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 <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
tools/stage-marc-import.pl