commit 1a08127e0187531d3adb9e240752c8cf066a1d69d5cb4b8cfdec91ae03ef3c4c Author: Stephan Kulow Date: Tue Jan 18 16:17:48 2011 +0000 - initial package 0.19 * created by cpanspec 1.78.03 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-FCGI-ProcManager?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/FCGI-ProcManager-0.19.tar.bz2 b/FCGI-ProcManager-0.19.tar.bz2 new file mode 100644 index 0000000..7e464c8 --- /dev/null +++ b/FCGI-ProcManager-0.19.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bcc65adda898fe50539bd1b7d2f6e94e7e423209172714117bc3ab2705ba47b7 +size 17022 diff --git a/perl-FCGI-ProcManager.changes b/perl-FCGI-ProcManager.changes new file mode 100644 index 0000000..0849420 --- /dev/null +++ b/perl-FCGI-ProcManager.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Tue Jan 18 16:17:25 UTC 2011 - coolo@novell.com + +- initial package 0.19 + * created by cpanspec 1.78.03 + diff --git a/perl-FCGI-ProcManager.spec b/perl-FCGI-ProcManager.spec new file mode 100644 index 0000000..4a61e1b --- /dev/null +++ b/perl-FCGI-ProcManager.spec @@ -0,0 +1,125 @@ +# +# spec file for package perl-FCGI-ProcManager (Version 0.19) +# +# Copyright (c) 2010 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 +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +Name: perl-FCGI-ProcManager +Version: 0.19 +Release: 1 +License: CHECK(Distributable) +%define cpan_name FCGI-ProcManager +Summary: functions for managing FastCGI applications. +Url: http://search.cpan.org/dist/FCGI-ProcManager/ +Group: Development/Libraries/Perl +#Source: http://www.cpan.org/authors/id/G/GB/GBJK/FCGI-ProcManager-%{version}.tar.gz +Source: %{cpan_name}-%{version}.tar.bz2 +BuildRequires: perl +BuildRequires: perl-macros +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch +%{perl_requires} + +%description +FCGI::ProcManager is used to serve as a FastCGI process manager. By +re-implementing it in perl, developers can more finely tune performance in +their web applications, and can take advantage of copy-on-write semantics +prevalent in UNIX kernel process management. The process manager should be +invoked before the caller''s request loop + +The primary routine, 'pm_manage', enters a loop in which it maintains a +number of FastCGI servers (via fork(2)), and which reaps those servers when +they die (via wait(2)). + +'pm_manage' provides too hooks: + + C - called just before the manager enters the manager loop. + C - called just before a server is returns from C + +It is necessary for the caller, when implementing its request loop, to +insert a call to 'pm_pre_dispatch' at the top of the loop, and then +7'pm_post_dispatch' at the end of the loop. + +Signal Handling + FCGI::ProcManager attempts to do the right thing for proper shutdowns + now. + + When it receives a SIGHUP, it sends a SIGTERM to each of its children, + and then resumes its normal operations. + + When it receives a SIGTERM, it sends a SIGTERM to each of its children, + sets an alarm(3) "die timeout" handler, and waits for each of its + children to die. If all children die before this timeout, process + manager exits with return status 0. If all children do not die by the + time the "die timeout" occurs, the process manager sends a SIGKILL to + each of the remaining children, and exists with return status 1. + + In order to get FastCGI servers to exit upon receiving a signal, it is + necessary to use its FAIL_ACCEPT_ON_INTR. See FCGI.pm's description of + FAIL_ACCEPT_ON_INTR. Unfortunately, if you want/need to use CGI::Fast, + it appears currently necessary to modify your installation of FCGI.pm, + with something like the following: + + -*- patch -*- + --- FCGI.pm 2001/03/09 01:44:00 1.1.1.3 + +++ FCGI.pm 2001/03/09 01:47:32 1.2 + @@ -24,7 +24,7 @@ + *FAIL_ACCEPT_ON_INTR = sub() { 1 }; + + sub Request(;***$$$) { + - my @defaults = (\*STDIN, \*STDOUT, \*STDERR, \%ENV, 0, 0); + + my @defaults = (\*STDIN, \*STDOUT, \*STDERR, \%ENV, 0, FAIL_ACCEPT_ON_INTR()); + splice @defaults,0,@_,@_; + RequestX(@defaults); + } + -*- end patch -*- + + Otherwise, if you don't, there is a loop around accept(2) which + prevents os_unix.c OS_Accept() from returning the necessary error when + FastCGI servers blocking on accept(2) receive the SIGTERM or SIGHUP. + + FCGI::ProcManager uses POSIX::sigaction() to override the default + SA_RESTART policy used for perl's %SIG behavior. Specifically, the + process manager never uses SA_RESTART, while the child FastCGI servers + turn off SA_RESTART around the accept(2) loop, but re-enstate it + otherwise. + + The desired (and implemented) effect is to give a request as big a + chance as possible to succeed and to delay their exits until after + their request, while allowing the FastCGI servers waiting for new + requests to die right away. + +%prep +%setup -q -n %{cpan_name}-%{version} + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor +%{__make} %{?_smp_mflags} + +%check +%{__make} test + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%clean +%{__rm} -rf %{buildroot} + +%files -f %{name}.files +%defattr(644,root,root,755) +%doc ChangeLog COPYING README TODO + +%changelog