Commit ba46c572 authored by Salvatore Bonaccorso's avatar Salvatore Bonaccorso

Merge tag 'upstream/0.22'

Upstream version 0.22
parents ea03d701 0fdb87fb
Revision history for Perl extension App::Daemon.
0.22 (09/23/2014)
(ms) Fixed test suite to shut down fork daemon at the end.
0.21 (04/28/2014)
(ms) Nicolai Langfeldt added -g option to switch to specified group
when app was started as root.
......
......@@ -2,7 +2,7 @@ package App::Daemon;
use strict;
use warnings;
our $VERSION = '0.21';
our $VERSION = '0.22';
use Getopt::Std;
use Pod::Usage;
......
......@@ -14,4 +14,5 @@ t/002Params.t
t/003CmdLine.t
t/004Pidfile.t
t/005Detach.t
META.yml Module meta-data (added by MakeMaker)
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
{
"abstract" : "Start an Application as a Daemon",
"author" : [
"Mike Schilli <m@perlmeister.com>"
],
"dynamic_config" : 1,
"generated_by" : "ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter version 2.130880",
"license" : [
"unknown"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : "2"
},
"name" : "App-Daemon",
"no_index" : {
"directory" : [
"t",
"inc"
]
},
"prereqs" : {
"build" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
}
},
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
}
},
"runtime" : {
"requires" : {
"File::Basename" : "0",
"File::Pid" : "0",
"File::Temp" : "0",
"Getopt::Std" : "0",
"Log::Log4perl" : "1.0",
"Pod::Usage" : "0",
"Sysadm::Install" : "0.37",
"Test::More" : "0"
}
}
},
"release_status" : "stable",
"resources" : {
"repository" : {
"url" : "http://github.com/mschilli/app-daemon"
}
},
"version" : "0.22"
}
--- #YAML:1.0
name: App-Daemon
version: 0.21
abstract: Start an Application as a Daemon
---
abstract: 'Start an Application as a Daemon'
author:
- Mike Schilli <m@perlmeister.com>
license: unknown
distribution_type: module
configure_requires:
ExtUtils::MakeMaker: 0
- 'Mike Schilli <m@perlmeister.com>'
build_requires:
ExtUtils::MakeMaker: 0
ExtUtils::MakeMaker: 0
configure_requires:
ExtUtils::MakeMaker: 0
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter version 2.130880'
license: unknown
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: App-Daemon
no_index:
directory:
- t
- inc
requires:
File::Basename: 0
File::Pid: 0
File::Temp: 0
Getopt::Std: 0
Log::Log4perl: 1.0
Pod::Usage: 0
Sysadm::Install: 0.37
Test::More: 0
File::Basename: 0
File::Pid: 0
File::Temp: 0
Getopt::Std: 0
Log::Log4perl: 1.0
Pod::Usage: 0
Sysadm::Install: 0.37
Test::More: 0
resources:
repository: http://github.com/mschilli/app-daemon
no_index:
directory:
- t
- inc
generated_by: ExtUtils::MakeMaker version 6.57_05
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
repository: http://github.com/mschilli/app-daemon
version: 0.22
######################################################################
App::Daemon 0.21
App::Daemon 0.22
######################################################################
NAME
......
use warnings;
use strict;
use Test::More tests => 4;
use Test::More tests => 5;
use File::Temp qw( tempdir );
use Sysadm::Install qw(:all);
use FindBin qw( $Bin );
......@@ -9,7 +9,7 @@ use App::Daemon qw(daemonize cmd_line_parse);
use Fcntl qw/:flock/;
use Log::Log4perl qw(:easy);
# Log::Log4perl->easy_init({ level => $DEBUG, layout => "%F-%L> %m%n" });
Log::Log4perl->easy_init({ level => $DEBUG, layout => "%F-%L> %m%n" });
my $tempdir = tempdir( CLEANUP => 1 );
......@@ -26,6 +26,7 @@ is $rc, 0, "app start";
# wait until process is up
while( 1 ) {
DEBUG "Checking for logfile";
if( -f $logfile ) {
ok 1, "daemon started";
last;
......@@ -36,6 +37,7 @@ while( 1 ) {
# wait until child exits
while( 1 ) {
my $data = slurp $logfile;
DEBUG "Checking logfile for 'waitpid done': [$data]";
if( $data =~ /parent waitpid done/ ) {
ok 1, "parent waitpid done";
last;
......@@ -45,4 +47,7 @@ while( 1 ) {
ok -f $pidfile, "pidfile still exists after child exit";
( $stdout, $stderr, $rc ) = tap @cmdline, "stop";
is $rc, 0, "app stop";
# print slurp( $logfile );
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment