Bugzilla – Attachment 72483 Details for
Bug 20342
Fix table locking issue, progress bar not updating, and allow use of plack for Stage MARC Import
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20342: Use File::Temp to get temp dir
Bug-20342-Use-FileTemp-to-get-temp-dir.patch (text/plain), 1.43 KB, created by
Kyle M Hall (khall)
on 2018-03-06 15:43:47 UTC
(
hide
)
Description:
Bug 20342: Use File::Temp to get temp dir
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2018-03-06 15:43:47 UTC
Size:
1.43 KB
patch
obsolete
>From 0114fe9f2b5fe9484f729a64e5137b1731491180 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatetsolutions.com> >Date: Tue, 6 Mar 2018 10:43:33 -0500 >Subject: [PATCH] Bug 20342: Use File::Temp to get temp dir > >--- > tools/stage-marc-import.pl | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/tools/stage-marc-import.pl b/tools/stage-marc-import.pl >index ee698a0..399e54b 100755 >--- a/tools/stage-marc-import.pl >+++ b/tools/stage-marc-import.pl >@@ -31,6 +31,7 @@ use CGI qw ( -utf8 ); > use CGI::Cookie; > use MARC::File::USMARC; > use Net::Server::Daemonize qw(daemonize); >+use File::Temp qw(tempdir); > > # Koha modules used > use C4::Context; >@@ -120,10 +121,11 @@ if ($completedJobID) { > exit 0; > } elsif (defined $pid) { > # Daemonize the child process os the parent will print its output >- my $pidfile = "/tmp/async$$.pid"; # deamonize requires a pid file even though it is supposed to be optional >+ # deamonize requires a pid file even though it is supposed to be optional >+ my $dir = tempdir( CLEANUP => 1 ); >+ my $pidfile = "$dir/async$$.pid"; > my @current_user = getpwuid($<); > daemonize( $current_user[2], $current_user[3], $pidfile ); >- unlink($pidfile); # otherwise it doesn't go away > # child > # close STDOUT to signal to Apache that > # we're now running in the background >-- >2.10.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20342
:
72481
| 72483