Hello community, here is the log from the commit of package perl-Proc-Simple for openSUSE:Factory checked in at 2013-06-21 13:32:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Proc-Simple (Old) and /work/SRC/openSUSE:Factory/.perl-Proc-Simple.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Proc-Simple" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Proc-Simple/perl-Proc-Simple.changes 2012-03-09 21:26:30.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Proc-Simple.new/perl-Proc-Simple.changes 2013-06-21 13:37:11.000000000 +0200 @@ -1,0 +2,14 @@ +Fri Jun 14 14:41:45 UTC 2013 - [email protected] + +- updated to 1.31 + (ms) To better deal with the race condition in the + previous release, kill the newly created child + process first, then send a killpg to its process + group and ignore the outcome. + + (ms) [RT 81203] Jim A Kessler reported a perl 5.16 issue + with the "AutoLoader" line, so I went ahead and removed + all references to "Exporter" and "AutoLoader", as + Proc::Simple isn't using them at all. + +------------------------------------------------------------------- Old: ---- Proc-Simple-1.30.tar.gz New: ---- Proc-Simple-1.31.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Proc-Simple.spec ++++++ --- /var/tmp/diff_new_pack.jso6C9/_old 2013-06-21 13:37:12.000000000 +0200 +++ /var/tmp/diff_new_pack.jso6C9/_new 2013-06-21 13:37:12.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package shutter +# spec file for package perl-Proc-Simple # -# Copyright (c) 2011 open-slx GmbH <[email protected]> +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,32 +15,77 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: perl-Proc-Simple -Version: 1.30 -Release: 1 -License: GPL-1.0+ or Artistic-1.0 +Version: 1.31 +Release: 0 %define cpan_name Proc-Simple -Summary: Proc::Simple Perl module -Url: http://search.cpan.org/dist/Proc-Simple/ +Summary: unknown +License: GPL-1.0+ or Artistic-1.0 Group: Development/Libraries/Perl -#Source: http://www.cpan.org/authors/id/M/MS/MSCHILLI/Proc-Simple-%{version}.tar.gz -Source0: Proc-Simple-%{version}.tar.gz -#BuildArch: noarch +Url: http://search.cpan.org/dist/Proc-Simple/ +Source: http://www.cpan.org/authors/id/M/MS/MSCHILLI/%{cpan_name}-%{version}.tar.gz +BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros - -%if 0%{?suse_version} < 1140 -Requires: perl = %{perl_version} -%else +#BuildRequires: perl(Proc::Simple) %{perl_requires} -%endif %description -Proc::Simple Perl module +The Proc::Simple package provides objects mimicing real-life processes from +a user's point of view. A new process object is created by + + $myproc = Proc::Simple->new(); + +Either external programs or perl subroutines can be launched and controlled +as processes in the background. + +A 10-second sleep process, for example, can be launched as an external +program as in + + $myproc->start("/bin/sleep 10"); # or + $myproc->start("/bin/sleep", "10"); + +or as a perl subroutine, as in + + sub mysleep { sleep(shift); } # Define mysleep() + $myproc->start(\&mysleep, 10); # Launch it. + +or even as + + $myproc->start(sub { sleep(10); }); + +The _start_ Method returns immediately after starting the specified process +in background, i.e. there's no blocking. It returns _1_ if the process has +been launched successfully and _0_ if not. + +The _poll_ method checks if the process is still running + + $running = $myproc->poll(); + +and returns _1_ if it is, _0_ if it's not. Finally, + + $myproc->kill(); + +terminates the process by sending it the SIGTERM signal. As an option, +another signal can be specified. + + $myproc->kill("SIGUSR1"); + +sends the SIGUSR1 signal to the running process. _kill_ returns _1_ if it +succeeds in sending the signal, _0_ if it doesn't. + +The methods are discussed in more detail in the next section. + +A destructor is provided so that a signal can be sent to the forked +processes automatically should the process object be destroyed or if the +process exits. By default this behaviour is turned off (see the +kill_on_destroy and signal_on_destroy methods). %prep %setup -q -n %{cpan_name}-%{version} +find . -type f -print0 | xargs -0 chmod 644 %build %{__perl} Makefile.PL INSTALLDIRS=vendor @@ -56,5 +101,6 @@ %files -f %{name}.files %defattr(-,root,root,755) +%doc Changes README %changelog ++++++ Proc-Simple-1.30.tar.gz -> Proc-Simple-1.31.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Proc-Simple-1.30/Changes new/Proc-Simple-1.31/Changes --- old/Proc-Simple-1.30/Changes 2011-07-31 21:49:38.000000000 +0200 +++ new/Proc-Simple-1.31/Changes 2012-11-17 21:57:41.000000000 +0100 @@ -2,6 +2,17 @@ Proc::Simple CHANGES ###################################################################### + 1.31 (2012/11/17) + (ms) To better deal with the race condition in the + previous release, kill the newly created child + process first, then send a killpg to its process + group and ignore the outcome. + + (ms) [RT 81203] Jim A Kessler reported a perl 5.16 issue + with the "AutoLoader" line, so I went ahead and removed + all references to "Exporter" and "AutoLoader", as + Proc::Simple isn't using them at all. + From 1.29: [RT 69782] Zefram reported race condition in t/sh-c.t, fixed by adding polling loop. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Proc-Simple-1.30/MANIFEST new/Proc-Simple-1.31/MANIFEST --- old/Proc-Simple-1.30/MANIFEST 2011-07-31 21:58:08.000000000 +0200 +++ new/Proc-Simple-1.31/MANIFEST 2012-11-17 22:00:28.000000000 +0100 @@ -18,3 +18,4 @@ t/stdouterr.t t/time.t t/wait.t +META.json Module JSON meta-data (added by MakeMaker) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Proc-Simple-1.30/MANIFEST.SKIP new/Proc-Simple-1.31/MANIFEST.SKIP --- old/Proc-Simple-1.30/MANIFEST.SKIP 2011-07-23 22:14:08.000000000 +0200 +++ new/Proc-Simple-1.31/MANIFEST.SKIP 2012-11-17 21:58:41.000000000 +0100 @@ -8,3 +8,5 @@ docs MANIFEST.bak adm/release +MYMETA.json +MYMETA.yml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Proc-Simple-1.30/META.json new/Proc-Simple-1.31/META.json --- old/Proc-Simple-1.30/META.json 1970-01-01 01:00:00.000000000 +0100 +++ new/Proc-Simple-1.31/META.json 2012-11-17 22:00:28.000000000 +0100 @@ -0,0 +1,47 @@ +{ + "abstract" : "unknown", + "author" : [ + "unknown" + ], + "dynamic_config" : 1, + "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.120351", + "license" : [ + "unknown" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "Proc-Simple", + "no_index" : { + "directory" : [ + "t", + "inc" + ] + }, + "prereqs" : { + "build" : { + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, + "configure" : { + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, + "runtime" : { + "requires" : { + "IO::Handle" : "0", + "Test::More" : "0" + } + } + }, + "release_status" : "stable", + "resources" : { + "repository" : { + "url" : "http://github.com/mschilli/proc-simple-perl" + } + }, + "version" : "1.31" +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Proc-Simple-1.30/META.yml new/Proc-Simple-1.31/META.yml --- old/Proc-Simple-1.30/META.yml 2011-07-31 21:58:09.000000000 +0200 +++ new/Proc-Simple-1.31/META.yml 2012-11-17 22:00:28.000000000 +0100 @@ -1,24 +1,25 @@ ---- #YAML:1.0 -name: Proc-Simple -version: 1.30 -abstract: ~ -author: [] -license: unknown -distribution_type: module -configure_requires: - ExtUtils::MakeMaker: 0 +--- +abstract: unknown +author: + - unknown build_requires: - ExtUtils::MakeMaker: 0 + ExtUtils::MakeMaker: 0 +configure_requires: + ExtUtils::MakeMaker: 0 +dynamic_config: 1 +generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.120351' +license: unknown +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4 +name: Proc-Simple +no_index: + directory: + - t + - inc requires: - IO::Handle: 0 - Test::More: 0 + IO::Handle: 0 + Test::More: 0 resources: - repository: http://github.com/mschilli/proc-simple-perl -no_index: - directory: - - t - - inc -generated_by: ExtUtils::MakeMaker version 6.55_02 -meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + repository: http://github.com/mschilli/proc-simple-perl +version: 1.31 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Proc-Simple-1.30/README new/Proc-Simple-1.31/README --- old/Proc-Simple-1.30/README 2011-07-31 21:58:08.000000000 +0200 +++ new/Proc-Simple-1.31/README 2012-11-17 22:00:27.000000000 +0100 @@ -1,5 +1,5 @@ ###################################################################### - Proc::Simple 1.30 + Proc::Simple 1.31 ###################################################################### NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Proc-Simple-1.30/Simple.pm new/Proc-Simple-1.31/Simple.pm --- old/Proc-Simple-1.30/Simple.pm 2011-07-31 21:55:52.000000000 +0200 +++ new/Proc-Simple-1.31/Simple.pm 2012-11-17 21:49:32.000000000 +0100 @@ -109,16 +109,13 @@ require 5.003; use strict; -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXIT_STATUS %INTERVAL +use vars qw($VERSION %EXIT_STATUS %INTERVAL %DESTROYED); use POSIX; use IO::Handle; -require Exporter; -@ISA = qw(Exporter AutoLoader); -@EXPORT = qw( ); -$VERSION = '1.30'; +$VERSION = '1.31'; ###################################################################### # Globals: Debug and the mysterious waitpid nohang constant. @@ -367,23 +364,18 @@ return 0; } - # kill process group instead of process to make sure that shell - # processes containing shell characters, which get launched via - # "sh -c" are killed along with their launching shells. - $sig = -$sig; - # Send signal if(CORE::kill($sig, $self->{'pid'})) { $self->dprt("KILL($sig, $self->{'pid'}) OK"); + + # now kill process group of process to make sure that shell + # processes containing shell characters, which get launched via + # "sh -c" are killed along with their launching shells. + # This might fail because of the race condition explained in + # start(), so we ignore the outcome. + CORE::kill(-$sig, $self->{'pid'}); } else { $self->dprt("KILL($sig, $self->{'pid'}) failed ($!)"); - # Have we hit the race condition of a newly forked child - # that hasn't called setsid() yet? Call kill again with - # a positive sig number. - if( $sig and $self->poll() ) { - $self->dprt("We've hit the race condition, using kill(+sig) instead"); - return CORE::kill(-$sig, $self->{'pid'}); - } return 0; } -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
