summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes10
-rw-r--r--LICENSE6
-rw-r--r--MANIFEST3
-rw-r--r--META.json14
-rw-r--r--META.yml9
-rw-r--r--Makefile.PL6
-rw-r--r--README6
-rw-r--r--debian/changelog16
-rw-r--r--debian/control6
-rw-r--r--debian/copyright4
-rw-r--r--dist.ini6
-rw-r--r--lib/Proc/Background.pm17
-rw-r--r--lib/Proc/Background/Unix.pm28
-rw-r--r--lib/Proc/Background/Win32.pm12
-rw-r--r--t/01proc.t6
-rw-r--r--t/author-pod-syntax.t15
-rw-r--r--weaver.ini2
17 files changed, 95 insertions, 71 deletions
diff --git a/Changes b/Changes
index 8623e97..f1f1049 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,16 @@
+Fri July 9 07:33:00 JST 2021
+
+ Version 1.22
+
+ * Fix bug in timeout of $p->wait on Unix perl earlier than 5.12
+ where Time::HiRes::alarm was failing to set the alarm.
+ * Fix test case 47 (which was failing on about 5% of systems)
+ by waiting longer for the process to exit
+
Tue Nov 5 17:39:00 EST 2019
Version 1.21
+
* Fix bug in timeout_system that caused it to wait the maximum
duration on every call.
diff --git a/LICENSE b/LICENSE
index 73ab4d1..297d55d 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-This software is copyright (c) 2019 by Michael Conrad, (C) 1998-2009 by Blair Zajac.
+This software is copyright (c) 2021 by Michael Conrad, (C) 1998-2009 by Blair Zajac.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@ b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
-This software is Copyright (c) 2019 by Michael Conrad, (C) 1998-2009 by Blair Zajac.
+This software is Copyright (c) 2021 by Michael Conrad, (C) 1998-2009 by Blair Zajac.
This is free software, licensed under:
@@ -272,7 +272,7 @@ That's all there is to it!
--- The Artistic License 1.0 ---
-This software is Copyright (c) 2019 by Michael Conrad, (C) 1998-2009 by Blair Zajac.
+This software is Copyright (c) 2021 by Michael Conrad, (C) 1998-2009 by Blair Zajac.
This is free software, licensed under:
diff --git a/MANIFEST b/MANIFEST
index 4302a8f..9ba8f7a 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.023.
Changes
LICENSE
MANIFEST
@@ -13,6 +13,5 @@ lib/Proc/Background.pm
lib/Proc/Background/Unix.pm
lib/Proc/Background/Win32.pm
t/01proc.t
-t/author-pod-syntax.t
t/sleep_exit.pl
weaver.ini
diff --git a/META.json b/META.json
index 728a513..8cb4296 100644
--- a/META.json
+++ b/META.json
@@ -5,7 +5,7 @@
"Michael Conrad <mike@nrdvana.net>"
],
"dynamic_config" : 1,
- "generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150001",
+ "generated_by" : "Dist::Zilla version 6.023, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
@@ -19,11 +19,6 @@
"requires" : {
"ExtUtils::MakeMaker" : "0"
}
- },
- "develop" : {
- "requires" : {
- "Test::Pod" : "1.41"
- }
}
},
"release_status" : "stable",
@@ -37,13 +32,14 @@
"web" : "https://github.com/nrdvana/perl-proc-background"
}
},
- "version" : "1.21",
+ "version" : "1.22",
"x_contributors" : [
"Florian Schlichting <fsfs@debian.org>",
"Kevin Ryde <user42@zip.com.au>",
"Salvador Fandi\u00f1o <sfandino@yahoo.com>"
],
- "x_generated_by_perl" : "v5.20.2",
- "x_serialization_backend" : "Cpanel::JSON::XS version 3.0115"
+ "x_generated_by_perl" : "v5.26.3",
+ "x_serialization_backend" : "Cpanel::JSON::XS version 4.08",
+ "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later"
}
diff --git a/META.yml b/META.yml
index bfafb73..32f09e6 100644
--- a/META.yml
+++ b/META.yml
@@ -7,7 +7,7 @@ build_requires: {}
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 1
-generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150001'
+generated_by: 'Dist::Zilla version 6.023, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -16,10 +16,11 @@ name: Proc-Background
resources:
bugtracker: https://github.com/nrdvana/perl-proc-background/issues
repository: https://github.com/nrdvana/perl-proc-background.git
-version: '1.21'
+version: '1.22'
x_contributors:
- 'Florian Schlichting <fsfs@debian.org>'
- 'Kevin Ryde <user42@zip.com.au>'
- 'Salvador Fandiño <sfandino@yahoo.com>'
-x_generated_by_perl: v5.20.2
-x_serialization_backend: 'YAML::Tiny version 1.69'
+x_generated_by_perl: v5.26.3
+x_serialization_backend: 'YAML::Tiny version 1.73'
+x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'
diff --git a/Makefile.PL b/Makefile.PL
index 804a4c5..1144c5e 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,5 +1,5 @@
# This Makefile.PL for Proc-Background was generated by
-# Dist::Zilla::Plugin::MakeMaker::Awesome 0.38.
+# Dist::Zilla::Plugin::MakeMaker::Awesome 0.48.
# Don't edit it but the dist.ini and plugins used to construct it.
use strict;
@@ -31,7 +31,7 @@ my %WriteMakefileArgs = (
"LICENSE" => "perl",
"NAME" => "Proc::Background",
"PREREQ_PM" => {},
- "VERSION" => "1.21",
+ "VERSION" => "1.22",
"test" => {
"TESTS" => "t/*.t"
}
@@ -45,7 +45,7 @@ my %WriteMakefileArgs = (
my %FallbackPrereqs = ();
-unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
+unless ( eval { ExtUtils::MakeMaker->VERSION('6.63_03') } ) {
delete $WriteMakefileArgs{TEST_REQUIRES};
delete $WriteMakefileArgs{BUILD_REQUIRES};
$WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
diff --git a/README b/README
index 5574031..2091bf0 100644
--- a/README
+++ b/README
@@ -87,6 +87,6 @@ utility to extract documentation from the module files directly.
COPYRIGHT
-Copyright (C) 1998-2005 Blair Zajac. All rights reserved. This
-package is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself.
+Copyright (C) 1998-2005 Blair Zajac, 2019-2021 Michael Conrad.
+All rights reserved. This package is free software; you can
+redistribute it and/or modify it under the same terms as Perl itself.
diff --git a/debian/changelog b/debian/changelog
index 81bf9f6..20c512a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,19 @@
+libproc-background-perl (1.22-1) unstable; urgency=medium
+
+ [ Debian Janitor ]
+ * Apply multi-arch hints.
+ + libproc-background-perl: Add Multi-Arch: foreign.
+ * Bump debhelper from old 12 to 13.
+ * Update standards version to 4.5.1, no changes needed.
+
+ [ gregor herrmann ]
+ * Import upstream version 1.22.
+ * Update years of upstream and packaging copyright.
+ * Declare compliance with Debian Policy 4.6.0.
+ * Set Rules-Requires-Root: no.
+
+ -- gregor herrmann <gregoa@debian.org> Sat, 18 Sep 2021 16:59:51 +0200
+
libproc-background-perl (1.21-1) unstable; urgency=medium
[ Debian Janitor ]
diff --git a/debian/control b/debian/control
index 51e2fef..c13d9f5 100644
--- a/debian/control
+++ b/debian/control
@@ -5,15 +5,17 @@ Uploaders: Niko Tyni <ntyni@iki.fi>,
Section: perl
Testsuite: autopkgtest-pkg-perl
Priority: optional
-Build-Depends: debhelper-compat (= 12)
+Build-Depends: debhelper-compat (= 13)
Build-Depends-Indep: perl
-Standards-Version: 4.5.0
+Standards-Version: 4.6.0
Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libproc-background-perl
Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libproc-background-perl.git
Homepage: https://metacpan.org/release/Proc-Background
+Rules-Requires-Root: no
Package: libproc-background-perl
Architecture: all
+Multi-Arch: foreign
Depends: ${misc:Depends},
${perl:Depends}
Description: generic interface for Unix and Win32 background process management
diff --git a/debian/copyright b/debian/copyright
index 81a95f6..3139716 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -5,13 +5,13 @@ Source: https://metacpan.org/release/Proc-Background
Files: *
Copyright: 1998-2009, Blair Zajac <blair@orcaware.com>
- 2019, Michael Conrad
+ 2019-2021, Michael Conrad
License: Artistic or GPL-1+
Files: debian/*
Copyright: 2005, Chip Salzenberg <chip@debian.org>
2006, Niko Tyni <ntyni@iki.fi>
- 2008-2020, gregor herrmann <gregoa@debian.org>
+ 2008-2021, gregor herrmann <gregoa@debian.org>
2009, Nathan Handler <nhandler@debian.org>
License: Artistic or GPL-1+
Comment: It is assumed that package maintainers have licensed their work
diff --git a/dist.ini b/dist.ini
index 913379d..41e778b 100644
--- a/dist.ini
+++ b/dist.ini
@@ -33,8 +33,10 @@ Win32::Process = 0.04
Win32::ShellQuote = 0.003001
[PodWeaver]
-[ExtraTests]
-[PodSyntaxTests]
+; authordep Pod::Weaver::Section::Contributors
+; authordep Pod::Elemental::Transformer::List
+;[ExtraTests]
+;[PodSyntaxTests]
[Manifest]
[License]
diff --git a/lib/Proc/Background.pm b/lib/Proc/Background.pm
index 3338fca..c2fe963 100644
--- a/lib/Proc/Background.pm
+++ b/lib/Proc/Background.pm
@@ -1,5 +1,5 @@
package Proc::Background;
-$Proc::Background::VERSION = '1.21';
+$Proc::Background::VERSION = '1.22';
# ABSTRACT: Generic interface to background process management
require 5.004_04;
@@ -265,9 +265,10 @@ sub timeout_system {
my $proc = Proc::Background->new(@_) or return;
my $end_time = $proc->start_time + $timeout;
- my $delay;
- while (($delay= ($end_time - time)) > 0 && !defined $proc->exit_code) {
+ my $delay= $timeout;
+ while ($delay > 0 && !defined $proc->exit_code) {
$proc->wait($delay);
+ $delay= $end_time - time;
}
my $alive = $proc->alive;
@@ -292,10 +293,6 @@ __END__
Proc::Background - Generic interface to background process management
-=head1 VERSION
-
-version 1.21
-
=head1 SYNOPSIS
use Proc::Background;
@@ -596,9 +593,13 @@ Salvador Fandiño <sfandino@yahoo.com>
=back
+=head1 VERSION
+
+version 1.22
+
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2019 by Michael Conrad, (C) 1998-2009 by Blair Zajac.
+This software is copyright (c) 2021 by Michael Conrad, (C) 1998-2009 by Blair Zajac.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Proc/Background/Unix.pm b/lib/Proc/Background/Unix.pm
index 4d2242f..eb606ff 100644
--- a/lib/Proc/Background/Unix.pm
+++ b/lib/Proc/Background/Unix.pm
@@ -1,5 +1,5 @@
package Proc::Background::Unix;
-$Proc::Background::Unix::VERSION = '1.21';
+$Proc::Background::Unix::VERSION = '1.22';
# ABSTRACT: Unix-specific implementation of process create/wait/kill
require 5.004_04;
@@ -7,6 +7,17 @@ use strict;
use Exporter;
use Carp;
use POSIX qw(:errno_h :sys_wait_h);
+# For un-explained mysterious reasons, Time::HiRes::alarm seem to misbehave on 5.10 and earlier
+if ($] >= 5.012) {
+ require Time::HiRes;
+ Time::HiRes->import('alarm');
+}
+else {
+ *alarm= sub {
+ # round up to whole seconds
+ CORE::alarm(POSIX::ceil($_[0]));
+ };
+}
@Proc::Background::Unix::ISA = qw(Exporter);
@@ -70,11 +81,10 @@ sub _waitpid {
# Implement the optional timeout with the 'alarm' call.
my $result= 0;
if ($blocking && $wait_seconds) {
- require Time::HiRes;
local $SIG{ALRM}= sub { die "alarm\n" };
- Time::HiRes::alarm($wait_seconds);
+ alarm($wait_seconds);
eval { $result= waitpid($self->{_os_obj}, 0); };
- Time::HiRes::alarm(0);
+ alarm(0);
}
else {
$result= waitpid($self->{_os_obj}, $blocking? 0 : WNOHANG);
@@ -123,10 +133,6 @@ __END__
Proc::Background::Unix - Unix-specific implementation of process create/wait/kill
-=head1 VERSION
-
-version 1.21
-
=head1 SYNOPSIS
Do not use this module directly.
@@ -155,9 +161,13 @@ Michael Conrad <mike@nrdvana.net>
=back
+=head1 VERSION
+
+version 1.22
+
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2019 by Michael Conrad, (C) 1998-2009 by Blair Zajac.
+This software is copyright (c) 2021 by Michael Conrad, (C) 1998-2009 by Blair Zajac.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/lib/Proc/Background/Win32.pm b/lib/Proc/Background/Win32.pm
index 0fe724d..2dbb912 100644
--- a/lib/Proc/Background/Win32.pm
+++ b/lib/Proc/Background/Win32.pm
@@ -1,5 +1,5 @@
package Proc::Background::Win32;
-$Proc::Background::Win32::VERSION = '1.21';
+$Proc::Background::Win32::VERSION = '1.22';
# ABSTRACT: Windows-specific implementation of process create/wait/kill
require 5.004_04;
@@ -141,10 +141,6 @@ __END__
Proc::Background::Win32 - Windows-specific implementation of process create/wait/kill
-=head1 VERSION
-
-version 1.21
-
=head1 SYNOPSIS
Do not use this module directly.
@@ -177,9 +173,13 @@ Michael Conrad <mike@nrdvana.net>
=back
+=head1 VERSION
+
+version 1.22
+
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2019 by Michael Conrad, (C) 1998-2009 by Blair Zajac.
+This software is copyright (c) 2021 by Michael Conrad, (C) 1998-2009 by Blair Zajac.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/t/01proc.t b/t/01proc.t
index ed3b980..ac3a1fc 100644
--- a/t/01proc.t
+++ b/t/01proc.t
@@ -203,8 +203,10 @@ $options{die_upon_destroy} = 1;
sleep 1;
ok(kill(0, $pid) == 1); # 46
$p7 = undef;
- sleep 1;
- ok(kill(0, $pid) == 0); # 47
+ # sleep up to 10 seconds waiting for the process id to stop being valid
+ my $kill= 1;
+ for (1..10) { sleep 1; last if !($kill=kill(0, $pid)); }
+ ok($kill == 0); # 47
} else {
ok(0); # 45
ok(0); # 46
diff --git a/t/author-pod-syntax.t b/t/author-pod-syntax.t
deleted file mode 100644
index 2233af0..0000000
--- a/t/author-pod-syntax.t
+++ /dev/null
@@ -1,15 +0,0 @@
-#!perl
-
-BEGIN {
- unless ($ENV{AUTHOR_TESTING}) {
- print qq{1..0 # SKIP these tests are for testing by the author\n};
- exit
- }
-}
-
-# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
-use strict; use warnings;
-use Test::More;
-use Test::Pod 1.41;
-
-all_pod_files_ok();
diff --git a/weaver.ini b/weaver.ini
index 8af68be..17708fc 100644
--- a/weaver.ini
+++ b/weaver.ini
@@ -3,7 +3,6 @@
[-SingleEncoding]
[Name]
-[Version]
[Region / prelude]
@@ -31,4 +30,5 @@ command = func
transformer = List
[Contributors]
+[Version]
[Legal]