[packages/perl-Perl-Unsafe-Signals] - initial, version 0.03

adwol adwol at pld-linux.org
Mon Oct 8 01:33:32 CEST 2018


commit 7b4368d9a588aac14b0ee1fcffa9574e74fd170d
Author: Adam Osuchowski <adwol at pld-linux.org>
Date:   Mon Oct 8 01:32:52 2018 +0200

    - initial, version 0.03

 perl-Perl-Unsafe-Signals.spec | 75 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)
---
diff --git a/perl-Perl-Unsafe-Signals.spec b/perl-Perl-Unsafe-Signals.spec
new file mode 100644
index 0000000..87c8bb1
--- /dev/null
+++ b/perl-Perl-Unsafe-Signals.spec
@@ -0,0 +1,75 @@
+#
+# Conditional build:
+%bcond_without	tests	# do perform "make test"
+#
+%include	/usr/lib/rpm/macros.perl
+%define		pdir	Perl
+%define		pnam	Unsafe-Signals
+Summary:	Perl::Unsafe::Signals - Allow unsafe handling of signals in selected blocks
+Summary(pl.UTF-8):	Perl::Unsafe::Signals - pozwala na obsługę niebezpiecznych sygnałów we wskazanych blokach
+Name:		perl-Perl-Unsafe-Signals
+Version:	0.03
+Release:	1
+# "same as perl", but GPL in version 2+ is specified afterwards
+License:	GPL v2+ or Artistic
+Group:		Development/Languages/Perl
+Source0:	http://www.cpan.org/modules/by-module/Perl/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5:	3eced0ffa43e5f9978aa9f83a0e13562
+URL:		http://search.cpan.org/dist/Perl-Unsafe-Signals/
+BuildRequires:	perl-devel >= 1:5.8.0
+BuildRequires:	rpm-perlprov >= 4.1-13
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Quoting perl581delta:
+
+In Perl 5.8.0 the so-called "safe signals" were introduced. This means
+that Perl no longer handles signals immediately but instead "between
+opcodes", when it is safe to do so. The earlier immediate handling
+easily could corrupt the internal state of Perl, resulting in
+mysterious crashes.
+
+It's possible since perl 5.8.1 to globally disable this feature by
+using the PERL_SIGNALS environment variables (as specified in
+"PERL_SIGNALS" in perlrun); but there's no way to disable it locally,
+for a short period of time. That's however something you might want to
+do, if, for example, your Perl program calls a C routine that will
+potentially run for a long time and for which you want to set a
+timeout.
+
+This module therefore allows you to define UNSAFE_SIGNALS blocks in
+which signals will be handled "unsafely".
+
+Note that, no matter how short you make the unsafe block, it will
+still be unsafe. Use with caution.
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+
+%build
+%{__perl} Makefile.PL \
+	INSTALLDIRS=vendor
+%{__make} \
+	CC="%{__cc}" \
+	OPTIMIZE="%{rpmcflags}"
+
+%{?with_tests:%{__make} test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} pure_install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes README
+%dir %{perl_vendorarch}/Perl/Unsafe
+%{perl_vendorarch}/Perl/Unsafe/Signals.pm
+%dir %{perl_vendorarch}/auto/Perl/Unsafe
+%dir %{perl_vendorarch}/auto/Perl/Unsafe/Signals
+%attr(755,root,root) %{perl_vendorarch}/auto/Perl/Unsafe/Signals/Signals.so
+%{_mandir}/man3/Perl::Unsafe::Signals.3pm*
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-Perl-Unsafe-Signals.git/commitdiff/7b4368d9a588aac14b0ee1fcffa9574e74fd170d



More information about the pld-cvs-commit mailing list