[Koha-bugs] [Bug 15032] [Plack] Scripts that fork (like stage-marc-import.pl) don' t work as expected

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 28 02:09:08 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15032

--- Comment #22 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Tomás Cohen Arazi from comment #21)
> I thought about this a couple times. There's some race between parent
> process and the fork closing the file handle for STDOUT. The best approach
> is to use some lib for creating child processes that takes care of this, or
> look carefully at what process needs a handle for STDOUT and which doesn't.
> 
> The backgrounded job is supposed to communicate its status through the DB,
> and the progress bars talk to a separate /svc endpoint, so the backgrounded
> job doesn't need STDOUT. That's why it is being closed (I guess) but it
> looks wrong at first glance.

http://search.cpan.org/~bzajac/Proc-Background-1.10/lib/Proc/Background.pm

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list