forked from pool/perl-Proc-Simple
Accepting request 178995 from home:coolo:update-perl
update OBS-URL: https://build.opensuse.org/request/show/178995 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Proc-Simple?expand=0&rev=3
This commit is contained in:
committed by
Git OBS Bridge
parent
5f692d0013
commit
827e405183
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:e7f2255d23f37031c2d20f1ca25e7146803f7afd448346dd1187a84e33af7bd0
|
|
||||||
size 16543
|
|
3
Proc-Simple-1.31.tar.gz
Normal file
3
Proc-Simple-1.31.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:5ed596d70693ebc62a75c56775766aa66808ea917e1765815dcc7cbe5299c3c2
|
||||||
|
size 17151
|
@@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jun 14 14:41:45 UTC 2013 - coolo@suse.com
|
||||||
|
|
||||||
|
- 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.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Dec 5 14:39:34 UTC 2011 - Sascha.Manns@open-slx.de
|
Mon Dec 5 14:39:34 UTC 2011 - Sascha.Manns@open-slx.de
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package shutter
|
# spec file for package perl-Proc-Simple
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 open-slx GmbH <Sascha.Manns@open-slx.de>
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -15,32 +15,77 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
Name: perl-Proc-Simple
|
Name: perl-Proc-Simple
|
||||||
Version: 1.30
|
Version: 1.31
|
||||||
Release: 1
|
Release: 0
|
||||||
License: GPL-1.0+ or Artistic-1.0
|
|
||||||
%define cpan_name Proc-Simple
|
%define cpan_name Proc-Simple
|
||||||
Summary: Proc::Simple Perl module
|
Summary: unknown
|
||||||
Url: http://search.cpan.org/dist/Proc-Simple/
|
License: GPL-1.0+ or Artistic-1.0
|
||||||
Group: Development/Libraries/Perl
|
Group: Development/Libraries/Perl
|
||||||
#Source: http://www.cpan.org/authors/id/M/MS/MSCHILLI/Proc-Simple-%{version}.tar.gz
|
Url: http://search.cpan.org/dist/Proc-Simple/
|
||||||
Source0: Proc-Simple-%{version}.tar.gz
|
Source: http://www.cpan.org/authors/id/M/MS/MSCHILLI/%{cpan_name}-%{version}.tar.gz
|
||||||
#BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: perl-macros
|
BuildRequires: perl-macros
|
||||||
|
#BuildRequires: perl(Proc::Simple)
|
||||||
%if 0%{?suse_version} < 1140
|
|
||||||
Requires: perl = %{perl_version}
|
|
||||||
%else
|
|
||||||
%{perl_requires}
|
%{perl_requires}
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%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
|
%prep
|
||||||
%setup -q -n %{cpan_name}-%{version}
|
%setup -q -n %{cpan_name}-%{version}
|
||||||
|
find . -type f -print0 | xargs -0 chmod 644
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||||
@@ -56,5 +101,6 @@ Proc::Simple Perl module
|
|||||||
|
|
||||||
%files -f %{name}.files
|
%files -f %{name}.files
|
||||||
%defattr(-,root,root,755)
|
%defattr(-,root,root,755)
|
||||||
|
%doc Changes README
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user