diff options
author | Vitaly Belekhov <rmrf17@gmail.com> | 2018-01-04 22:50:05 +0700 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-01-04 10:50:05 -0500 |
commit | 842ac4647276ba5354289082adbdca75e0b19107 (patch) | |
tree | 1420238c5f275416b7aa0b4023c6dd6fdd618948 /Bugzilla/JobQueue.pm | |
parent | 726dbd97cdf46a766ba8da6959594833ee03d65a (diff) | |
download | bugs-842ac4647276ba5354289082adbdca75e0b19107.tar bugs-842ac4647276ba5354289082adbdca75e0b19107.tar.gz bugs-842ac4647276ba5354289082adbdca75e0b19107.tar.bz2 bugs-842ac4647276ba5354289082adbdca75e0b19107.tar.xz bugs-842ac4647276ba5354289082adbdca75e0b19107.zip |
Bug 1301887 - File::Slurp triggers warnings on perl 5.24 (#53)
* Bug 1301887 - File::Slurp triggers warnings on perl 5.24 and it is recommended to not use it (#21)
r=mtyson
* Fix for vrite in aa735d4
* Added https://gitweb.gentoo.org/proj/gentoo-bugzilla.git/commit/?id=ca7bfc9c485c959fad2aee1f7c1dbc0fb484553b
Diffstat (limited to 'Bugzilla/JobQueue.pm')
-rw-r--r-- | Bugzilla/JobQueue.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Bugzilla/JobQueue.pm b/Bugzilla/JobQueue.pm index d5ceda8e9..6ff85d84f 100644 --- a/Bugzilla/JobQueue.pm +++ b/Bugzilla/JobQueue.pm @@ -14,8 +14,8 @@ use warnings; use Bugzilla::Constants; use Bugzilla::Error; use Bugzilla::Install::Util qw(install_string); +use Bugzilla::Util qw(read_text); use File::Basename; -use File::Slurp; use base qw(TheSchwartz); use fields qw(_worker_pidfile); @@ -124,7 +124,7 @@ sub subprocess_worker { # And poll the PID to detect when the working has finished. # We do this instead of system() to allow for the INT signal to # interrup us and trigger kill_worker(). - my $pid = read_file($self->{_worker_pidfile}, err_mode => 'quiet'); + my $pid = read_text($self->{_worker_pidfile}, err_mode => 'quiet'); if ($pid) { sleep(3) while(kill(0, $pid)); } @@ -139,7 +139,7 @@ sub subprocess_worker { sub kill_worker { my $self = Bugzilla->job_queue(); if ($self->{_worker_pidfile} && -e $self->{_worker_pidfile}) { - my $worker_pid = read_file($self->{_worker_pidfile}); + my $worker_pid = read_text($self->{_worker_pidfile}); if ($worker_pid && kill(0, $worker_pid)) { $self->debug("Stopping worker process"); system "$0 -f -p '" . $self->{_worker_pidfile} . "' stop"; |