Hello community,
here is the log from the commit of package perl-Sys-SigAction for openSUSE:Factory checked in at 2013-08-13 10:19:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Sys-SigAction (Old)
and /work/SRC/openSUSE:Factory/.perl-Sys-SigAction.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Sys-SigAction"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Sys-SigAction/perl-Sys-SigAction.changes 2013-07-29 17:50:50.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Sys-SigAction.new/perl-Sys-SigAction.changes 2013-08-13 10:19:13.000000000 +0200
@@ -1,0 +2,40 @@
+Tue Aug 6 17:49:06 UTC 2013 - coolo@suse.com
+
+- updated to 0.20
+ Even if CTime::HiRes::ualarm() exists, it may not necessarily
+ work. (There were way too many broken smoke tests with were
+ the result of this. One reason for this may bave been that the test
+ was looking for too small an interval of sub-second timeouts. On busy
+ systems, this may have been causing tests to fail.
+
+ Got rid of the attempt at tracking broken environments in timeout.t
+ (the hash structure mentioned in the previous change.
+
+ The sub-second timer tests now set a timeout at 0.1 seconds, and check
+ for a delta time the is less then 0.8 seconds. Proving that they completed
+ in under 1 second, but give a wide range of execution time to account
+ for busy systems.
+
+ Also Makefile.PL now looks for CTime::HiRes::ualarm(), and tests it.
+ If it works, high resolution timeouts are enabled in Sys
+ Makefile.PL reports what it finds, and t/timeout.t reports when high
+ resolution tests are disabled, but timeout.t should not fail because of
+ this... it will just run fewer tests.
+
+ =head2 Changes in Sys::SigAction 0.19 27 Jul 2013
+
+ Change sig_alarm() to use HiRes::ualarm() instead of
+ HiRes::alarm(). Hoping to fix hires test failures
+ on some platforms.
+
+ Build a hash structure in timeout.t to disable
+ the HiRes tests on certain platforms where these functions may
+ to be consistently broken, but disable them for at least
+ another round, hoping that the change to using HiRes::ualarm()
+ solves the problem.
+
+ Also, restructure timeout.t to hardcode the number of tests
+ run. Apparently Test::More on perl 5.8.x insisteds on getting
+ the plan before ANY tests are run.
+
+-------------------------------------------------------------------
Old:
----
Sys-SigAction-0.18.tar.gz
New:
----
Sys-SigAction-0.20.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Sys-SigAction.spec ++++++
--- /var/tmp/diff_new_pack.gbNLPY/_old 2013-08-13 10:19:13.000000000 +0200
+++ /var/tmp/diff_new_pack.gbNLPY/_new 2013-08-13 10:19:13.000000000 +0200
@@ -17,7 +17,7 @@
Name: perl-Sys-SigAction
-Version: 0.18
+Version: 0.20
Release: 0
%define cpan_name Sys-SigAction
Summary: Perl extension for Consistent Signal Handling
++++++ Sys-SigAction-0.18.tar.gz -> Sys-SigAction-0.20.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-SigAction-0.18/Changes new/Sys-SigAction-0.20/Changes
--- old/Sys-SigAction-0.18/Changes 2013-07-25 00:38:14.000000000 +0200
+++ new/Sys-SigAction-0.20/Changes 2013-08-05 02:32:59.000000000 +0200
@@ -8,6 +8,59 @@
Revision history for Sys::SigAction.
+=head2 Changes in Sys::SigAction 0.20 4 Aug 2013
+
+Even if CTime::HiRes::ualarm() exists, it may not necessarily
+work. (There were way too many broken smoke tests with were
+the result of this. One reason for this may bave been that the test
+was looking for too small an interval of sub-second timeouts. On busy
+systems, this may have been causing tests to fail.
+
+Got rid of the attempt at tracking broken environments in timeout.t
+(the hash structure mentioned in the previous change.
+
+The sub-second timer tests now set a timeout at 0.1 seconds, and check
+for a delta time the is less then 0.8 seconds. Proving that they completed
+in under 1 second, but give a wide range of execution time to account
+for busy systems.
+
+Also Makefile.PL now looks for CTime::HiRes::ualarm(), and tests it.
+If it works, high resolution timeouts are enabled in Sys
+Makefile.PL reports what it finds, and t/timeout.t reports when high
+resolution tests are disabled, but timeout.t should not fail because of
+this... it will just run fewer tests.
+
+=head2 Changes in Sys::SigAction 0.19 27 Jul 2013
+
+Change sig_alarm() to use HiRes::ualarm() instead of
+HiRes::alarm(). Hoping to fix hires test failures
+on some platforms.
+
+Build a hash structure in timeout.t to disable
+the HiRes tests on certain platforms where these functions may
+to be consistently broken, but disable them for at least
+another round, hoping that the change to using HiRes::ualarm()
+solves the problem.
+
+Also, restructure timeout.t to hardcode the number of tests
+run. Apparently Test::More on perl 5.8.x insisteds on getting
+the plan before ANY tests are run.
+
+Build similar structure in mask.t to disable
+the test on certain platforms were signal masking appears
+to be broken. Currently this is set to
+
+ my $mask_broken_platforms = {
+ 'archname' => { 'i686-cygwin-thread-multi-64int' => 1
+ }
+ ,'perlver' => { 'v5.10.1' => 1
+ }
+ };
+
+
+Update Makefile.PL to note the fact the HiRes timeouts may
+broken on some platforms.
+
=head2 Changes in Sys::SigAction 0.18 24 Jul 2013
Fix "bareword" error on some platforms at least, by explicitly importing
@@ -28,7 +81,7 @@
caught in the POD. (bug #79130).
When Time::HiRes is present, allow for long timeouts longer than the
-POSIX::MAX_INT microseconds when Time::HiRes is present. Just call
+POSIX::INT_MAX microseconds when Time::HiRes is present. Just call
call alarm() instead of ualarm() in the case where input argument
would result in a msecs value in an argument to ualarm which is
larger than POSIX::INT_MAX (and, of course, add a test for this in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-SigAction-0.18/MANIFEST new/Sys-SigAction-0.20/MANIFEST
--- old/Sys-SigAction-0.18/MANIFEST 2006-10-09 16:19:50.000000000 +0200
+++ new/Sys-SigAction-0.20/MANIFEST 2013-08-04 23:39:37.000000000 +0200
@@ -1,5 +1,4 @@
Changes
-lib/Sys/SigAction.pm
Makefile.PL
META.yml Module meta-data (added by MakeMaker)
README
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-SigAction-0.18/META.yml new/Sys-SigAction-0.20/META.yml
--- old/Sys-SigAction-0.18/META.yml 2013-07-25 01:06:02.000000000 +0200
+++ new/Sys-SigAction-0.20/META.yml 2013-08-05 02:35:55.000000000 +0200
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Sys-SigAction
-version: 0.18
+version: 0.20
abstract: Perl extension for Consistent Signal Handling
author:
- Lincoln A. Baxter <lab-at-lincolnbaxter-dot-com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-SigAction-0.18/Makefile.PL new/Sys-SigAction-0.20/Makefile.PL
--- old/Sys-SigAction-0.18/Makefile.PL 2011-06-22 13:56:21.000000000 +0200
+++ new/Sys-SigAction-0.20/Makefile.PL 2013-08-05 02:33:05.000000000 +0200
@@ -31,20 +31,10 @@
if ( ! $@ || $Config{usethreads} || $Config{useithreads} || $Config{use5005threads} ) {
warn q{
- Using Signals in a multi-thread perl application is unsupported
- by Sys::SigAction.
-
- Read the following from perldoc perlthrtut:
-
- ...mixing signals and threads may be problematic.
- Implementations are platform-dependent, and even the POSIX semantics
- may not be what you expect (and Perl doesn't even give you the full
- POSIX API). For example, there is no way to guarantee that a signal
- sent to a multi-threaded Perl application will get intercepted by
- any particular thread.
-
-
- You are on your own if we use this module in a multi threaded application
+ This perl has multithread support enabled, this is not a problem for
+ single threaded perl applications.
+
+ Please see "MULTITHREAD PERL in the Sys::SigAction POD for more information
Lincoln
@@ -67,8 +57,6 @@
This perl is not supported.
Perl must be built with 'useposix' and 'sigaction' defined.
- Lincoln
-
};
}
@@ -89,18 +77,107 @@
};
}
-print "Checking for Time::HiRes (support for fractional seconds in timeouts)\n";
-eval "use Time::HiRes qw( ualarm )";
-if ( $@ ) {
+print "Checking for cygwin... (masking signals is broken on some versions at least)\n";
+if ( $^O =~ /cygwin/ ) {
warn q(
-
- Time::HiRes is not available. Fractional seconds in timeout_call()
- will be raised to the next high integer value with POSIX::ceil().
-
+ Smoke testers have discovered that t/mask.t fails on at least
+ some verions cygwin. Specific versions of the os and perl
+ and now protected... but others may be found. On this platforms
+ masking signals probably does not work. See the hash reference
+ \$broken_platforms for platforms known to be broken.
+
);
}
+my $SAAD = "lib/Sys/SigAction/" ;
+my $SAA = "$SAAD/Alarm.pm" ;
+print "Writing $SAA\n" ;
+mkdir $SAAD if ( not -d $SAAD );
+
+open( SAH, ">$SAA" );
+print SAH q(
+package Sys::SigAction::Alarm;
+require 5.005;
+use strict;
+#use warnings;
+use vars qw( @ISA @EXPORT_OK );
+require Exporter;
+@ISA = qw( Exporter );
+@EXPORT_OK = qw( ssa_alarm );
+my $have_hires = scalar eval 'use Time::HiRes; Time::HiRes::ualarm(0); 1;';
+use POSIX qw( INT_MAX ceil ) ;
+my $hrworks;
+sub ssa_alarm($)
+{
+ my $secs = shift;
+ #print print "secs=$secs\n";
+
+ if ( $hrworks and ($secs le (INT_MAX()/1_000_000.0) ) )
+ {
+ Time::HiRes::ualarm( $secs * 1_000_000 );
+ }
+ else
+ {
+ alarm( ceil( $secs ) );
+ }
+}
+
+sub hires_works { return $hrworks; }; #test support
+
+);
+print "Looking for Time::HiRes with a working ualarm()... \n" ;
+use constant HR => eval 'use Time::HiRes; Time::HiRes::ualarm(0); 1;' ;
+sub forever { pause(); }
+sub handler { die "TIMEDOUT"; }
+my $et, $st;
+my $hr_works = 0;
+if ( not HR )
+{
+ print q(
+ Time::HiRes is not installed.
+ High resolution timeouts disabled.
+);
+}
+else {
+ print "Testing Time::HiRes::ualarm()\n" ;
+ $SIG{'ALRM'} = \&handler;
+ eval {
+ $st = Time::HiRes::time();
+ eval {
+ Time::HiRes::ualarm( 0.1 * 1_000_000 );
+ forever();
+ };
+ Time::HiRes::ualarm( 0 );
+ $et = Time::HiRes::time();
+ #print "outside forever eval\n" ;
+ };
+ my $delta = $et - $st;
+ if ( $delta < 0.8 ) {
+ print q(
+ Time::HiRes::ualarm() exists and works.
+ High resolution timeouts enabled."
+);
+ $hr_works = 1;
+ }
+ else
+ {
+ warn q(
+ Time::HiRes exists on this platform but Time::HiRes::ualarm
+ appears to be broken. High resolution timeouts disabled.
+);
+ }
+}
+print SAH '$hrworks = '."$hr_works; 1;\n" ;
+close( SAH );
+print "\nWrote $SAA\n" ;
+
+if ( not $hr_works ) {
+ warn q(
+ Fractional seconds in timeout_call() may be used but will be
+ raised to the next higher integer value with POSIX::ceil().
+);
+}
#ok... enough defensiveness...
my $args = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sys-SigAction-0.18/lib/Sys/SigAction.pm new/Sys-SigAction-0.20/lib/Sys/SigAction.pm
--- old/Sys-SigAction-0.18/lib/Sys/SigAction.pm 2013-07-25 01:02:39.000000000 +0200
+++ new/Sys-SigAction-0.20/lib/Sys/SigAction.pm 2013-08-04 23:29:04.000000000 +0200
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2004-2009 Lincoln A. Baxter
+# Copyright (c) 2004-2013 Lincoln A. Baxter
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file,
@@ -17,29 +17,19 @@
#or core alarm with the ceil of the value passed otherwise.
#timeout_call uses sig_alarm()
-use constant HAVE_HIRES => scalar eval 'use Time::HiRes (); Time::HiRes::alarm(0); 1;';
-
-sub have_hires() { HAVE_HIRES }; #test support
-
-sub sig_alarm #replacement for alarm, takes factional seconds in floating point format
+#replacement for alarm, factional second arg in floating point format:
+use Sys::SigAction::Alarm qw( ssa_alarm );
+sub sig_alarm
{
my $secs = shift;
- #print print "secs=$secs\n";
-
- if ( HAVE_HIRES && $secs*1_000_000 <= INT_MAX ) {
- Time::HiRes::alarm( $secs );
- }
- else
- {
- alarm( ceil( $secs ) );
- }
+ ssa_alarm( $secs );
}
#use Data::Dumper;
@ISA = qw( Exporter );
@EXPORT_OK = qw( set_sig_handler timeout_call sig_name sig_number sig_alarm );
-$VERSION = '0.18';
+$VERSION = '0.20';
use Config;
my %signame = ();
@@ -281,7 +271,10 @@
code reference and optional arguments, and executes the code reference
wrapped with an alarm timeout. timeout_call accepts seconds in floating
point format, so you can time out call with a resolution of 0.000001
-seconds (assumes Time::HiRes is loadable).
+seconds. If CTime::HiRes is not loadable or CTime::HiRes::ualarm() does
+not work, then the factional part of the time value passed to C