diff -Nru libserver-starter-perl-0.32/Build.PL libserver-starter-perl-0.33/Build.PL --- libserver-starter-perl-0.32/Build.PL 2015-08-25 02:10:50.000000000 +0000 +++ libserver-starter-perl-0.33/Build.PL 2016-12-13 00:39:23.000000000 +0000 @@ -14,11 +14,32 @@ use File::Spec; my %args = ( - license => 'perl', + license => 'perl_5', dynamic_config => 0, configure_requires => { - 'Module::Build' => 0.38, + 'Module::Build' => '0.4005', + }, + + requires => { + 'perl' => '5.008', + }, + + recommends => { + }, + + suggests => { + }, + + build_requires => { + }, + + test_requires => { + 'IO::Socket::IP' => '0', + 'Net::EmptyPort' => '0', + 'Test::Requires' => '0', + 'Test::SharedFork' => '0', + 'Test::TCP' => '2.08', }, name => 'Server-Starter', @@ -51,15 +72,3 @@ )->new(%args); $builder->create_build_script(); -use File::Copy; - -print "cp META.json MYMETA.json\n"; -copy("META.json","MYMETA.json") or die "Copy failed(META.json): $!"; - -if (-f 'META.yml') { - print "cp META.yml MYMETA.yml\n"; - copy("META.yml","MYMETA.yml") or die "Copy failed(META.yml): $!"; -} else { - print "There is no META.yml... You may install this module from the repository...\n"; -} - diff -Nru libserver-starter-perl-0.32/Changes libserver-starter-perl-0.33/Changes --- libserver-starter-perl-0.32/Changes 2015-08-25 02:10:50.000000000 +0000 +++ libserver-starter-perl-0.33/Changes 2016-12-13 00:39:23.000000000 +0000 @@ -1,5 +1,10 @@ Revision history for Perl extension Server::Starter. +0.33 2016-12-13T00:37:49Z + - do not kill old worker too early (thanks to Xuanzhong Wei) #45 + - allow use of `--enable-auto-restart` without an argument (thanks to Slaven Rezic) #41 + + 0.32 2015-08-25T02:09:18Z - fix compatibility issue on Solaris (thanks to Syohei YOSHIDA) #40 diff -Nru libserver-starter-perl-0.32/debian/changelog libserver-starter-perl-0.33/debian/changelog --- libserver-starter-perl-0.32/debian/changelog 2016-11-21 20:26:02.000000000 +0000 +++ libserver-starter-perl-0.33/debian/changelog 2016-12-25 20:25:05.000000000 +0000 @@ -1,3 +1,11 @@ +libserver-starter-perl (0.33-1) unstable; urgency=medium + + * Team upload. + * Import upstream version 0.33. + * Update build dependencies. + + -- gregor herrmann Sun, 25 Dec 2016 21:25:05 +0100 + libserver-starter-perl (0.32-2) unstable; urgency=medium * Team upload. diff -Nru libserver-starter-perl-0.32/debian/control libserver-starter-perl-0.33/debian/control --- libserver-starter-perl-0.32/debian/control 2016-11-21 20:25:25.000000000 +0000 +++ libserver-starter-perl-0.33/debian/control 2016-12-25 20:25:05.000000000 +0000 @@ -6,7 +6,7 @@ Testsuite: autopkgtest-pkg-perl Priority: optional Build-Depends: debhelper (>= 9), - libmodule-build-perl, + libmodule-build-perl (>= 0.400500), perl Standards-Version: 3.9.8 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libserver-starter-perl.git diff -Nru libserver-starter-perl-0.32/lib/Server/Starter.pm libserver-starter-perl-0.33/lib/Server/Starter.pm --- libserver-starter-perl-0.32/lib/Server/Starter.pm 2015-08-25 02:10:50.000000000 +0000 +++ libserver-starter-perl-0.33/lib/Server/Starter.pm 2016-12-13 00:39:23.000000000 +0000 @@ -14,7 +14,7 @@ use Exporter qw(import); -our $VERSION = '0.32'; +our $VERSION = '0.33'; our @EXPORT_OK = qw(start_server restart_server stop_server server_ports); my @signals_received; @@ -389,7 +389,9 @@ my $kill_old_delay = defined $ENV{KILL_OLD_DELAY} ? $ENV{KILL_OLD_DELAY} : $ENV{ENABLE_AUTO_RESTART} ? 5 : 0; if ($kill_old_delay != 0) { print STDERR "sleeping $kill_old_delay secs before killing old workers\n"; - sleep $kill_old_delay; + while ($kill_old_delay > 0) { + $kill_old_delay -= sleep $kill_old_delay || 1; + } } print STDERR "killing old workers\n"; kill $opts->{signal_on_hup}, $_ @@ -563,7 +565,7 @@ =head1 DESCRIPTION -It is often a pain to write a server program that supports graceful restarts, with no resource leaks. L solves the problem by splitting the task into two. One is L, a script provided as a part of the module, which works as a superdaemon that binds to zero or more TCP ports or unix sockets, and repeatedly spawns the server program that actually handles the necessary tasks (for example, responding to incoming commenctions). The spawned server programs under L call accept(2) and handle the requests. +It is often a pain to write a server program that supports graceful restarts, with no resource leaks. L solves the problem by splitting the task into two. One is L, a script provided as a part of the module, which works as a superdaemon that binds to zero or more TCP ports or unix sockets, and repeatedly spawns the server program that actually handles the necessary tasks (for example, responding to incoming connections). The spawned server programs under L call accept(2) and handle the requests. To gracefully restart the server program, send SIGHUP to the superdaemon. The superdaemon spawns a new server program, and if (and only if) it starts up successfully, sends SIGTERM to the old server program. diff -Nru libserver-starter-perl-0.32/META.json libserver-starter-perl-0.33/META.json --- libserver-starter-perl-0.32/META.json 2015-08-25 02:10:50.000000000 +0000 +++ libserver-starter-perl-0.33/META.json 2016-12-13 00:39:23.000000000 +0000 @@ -4,7 +4,7 @@ "Kazuho Oku" ], "dynamic_config" : 0, - "generated_by" : "Minilla/v2.3.0", + "generated_by" : "Minilla/v3.0.6", "license" : [ "perl_5" ], @@ -28,7 +28,7 @@ "prereqs" : { "configure" : { "requires" : { - "Module::Build" : "0.38" + "Module::Build" : "0.4005" } }, "develop" : { @@ -58,7 +58,7 @@ "provides" : { "Server::Starter" : { "file" : "lib/Server/Starter.pm", - "version" : "0.32" + "version" : "0.33" }, "Server::Starter::Guard" : { "file" : "lib/Server/Starter/Guard.pm" @@ -75,7 +75,7 @@ "web" : "https://github.com/kazuho/p5-Server-Starter" } }, - "version" : "0.32", + "version" : "0.33", "x_contributors" : [ "kazuho ", "yappo ", @@ -94,6 +94,10 @@ "Andy Jones ", "Arthur Axel 'fREW' Schmidt ", "Syohei YOSHIDA ", + "Slaven Rezic ", + "Mikhail Ivanov ", + "Xuanzhong Wei ", "Kazuho Oku " - ] + ], + "x_serialization_backend" : "JSON::PP version 2.27300" } diff -Nru libserver-starter-perl-0.32/META.yml libserver-starter-perl-0.33/META.yml --- libserver-starter-perl-0.32/META.yml 2015-08-25 02:10:50.000000000 +0000 +++ libserver-starter-perl-0.33/META.yml 2016-12-13 00:39:23.000000000 +0000 @@ -9,9 +9,9 @@ Test::SharedFork: '0' Test::TCP: '2.08' configure_requires: - Module::Build: '0.38' + Module::Build: '0.4005' dynamic_config: 0 -generated_by: 'Minilla/v2.3.0, CPAN::Meta::Converter version 2.150001' +generated_by: 'Minilla/v3.0.6, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -30,7 +30,7 @@ provides: Server::Starter: file: lib/Server/Starter.pm - version: '0.32' + version: '0.33' Server::Starter::Guard: file: lib/Server/Starter/Guard.pm requires: @@ -39,7 +39,7 @@ bugtracker: https://github.com/kazuho/p5-Server-Starter/issues homepage: https://github.com/kazuho/p5-Server-Starter repository: git://github.com/kazuho/p5-Server-Starter.git -version: '0.32' +version: '0.33' x_contributors: - 'kazuho ' - 'yappo ' @@ -58,4 +58,8 @@ - 'Andy Jones ' - "Arthur Axel 'fREW' Schmidt " - 'Syohei YOSHIDA ' + - 'Slaven Rezic ' + - 'Mikhail Ivanov ' + - 'Xuanzhong Wei ' - 'Kazuho Oku ' +x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -Nru libserver-starter-perl-0.32/README.md libserver-starter-perl-0.33/README.md --- libserver-starter-perl-0.32/README.md 2015-08-25 02:10:50.000000000 +0000 +++ libserver-starter-perl-0.33/README.md 2016-12-13 00:39:23.000000000 +0000 @@ -24,7 +24,7 @@ # DESCRIPTION -It is often a pain to write a server program that supports graceful restarts, with no resource leaks. [Server::Starter](https://metacpan.org/pod/Server::Starter) solves the problem by splitting the task into two. One is [start\_server](https://metacpan.org/pod/start_server), a script provided as a part of the module, which works as a superdaemon that binds to zero or more TCP ports or unix sockets, and repeatedly spawns the server program that actually handles the necessary tasks (for example, responding to incoming commenctions). The spawned server programs under [Server::Starter](https://metacpan.org/pod/Server::Starter) call accept(2) and handle the requests. +It is often a pain to write a server program that supports graceful restarts, with no resource leaks. [Server::Starter](https://metacpan.org/pod/Server::Starter) solves the problem by splitting the task into two. One is [start\_server](https://metacpan.org/pod/start_server), a script provided as a part of the module, which works as a superdaemon that binds to zero or more TCP ports or unix sockets, and repeatedly spawns the server program that actually handles the necessary tasks (for example, responding to incoming connections). The spawned server programs under [Server::Starter](https://metacpan.org/pod/Server::Starter) call accept(2) and handle the requests. To gracefully restart the server program, send SIGHUP to the superdaemon. The superdaemon spawns a new server program, and if (and only if) it starts up successfully, sends SIGTERM to the old server program. diff -Nru libserver-starter-perl-0.32/script/start_server libserver-starter-perl-0.33/script/start_server --- libserver-starter-perl-0.32/script/start_server 2015-08-25 02:10:50.000000000 +0000 +++ libserver-starter-perl-0.33/script/start_server 2016-12-13 00:39:23.000000000 +0000 @@ -21,7 +21,7 @@ ref($opts{$name}) ? $opts{$name} : \$opts{$name}; }, } qw(port=s path=s interval=i log-file=s pid-file=s dir=s signal-on-hup=s signal-on-term=s - backlog=i envdir=s enable-auto-restart=i daemonize auto-restart-interval=i kill-old-delay=i + backlog=i envdir=s enable-auto-restart daemonize auto-restart-interval=i kill-old-delay=i status-file=s restart stop help version), ) or exit 1; pod2usage(