NAME
Zing::Daemon - Process Daemon
ABSTRACT
Daemon Process Management
SYNOPSIS
use Zing;
use Zing::Daemon;
my $scheme = ['MyApp', [], 1];
my $daemon = Zing::Daemon->new(name => 'app', app => Zing->new(scheme => $scheme));
# $daemon->start;
DESCRIPTION
This package provides the mechanisms for running a Zing application as a daemon process.
LIBRARIES
This package uses type constraints from:
ATTRIBUTES
This package has the following attributes:
app
app(Zing)
This attribute is read-only, accepts (Zing)
values, and is required.
log
log(Logger)
This attribute is read-only, accepts (Logger)
values, and is optional.
name
name(Str)
This attribute is read-only, accepts (Str)
values, and is required.
pid_dir
pid_dir(Str)
This attribute is read-only, accepts (Str)
values, and is optional.
pid_file
pid_file(Str)
This attribute is read-only, accepts (Str)
values, and is optional.
pid_path
pid_path(Str)
This attribute is read-only, accepts (Str)
values, and is optional.
METHODS
This package implements the following methods:
execute
execute() : Int
The execute method forks the application and creates a pid file under the "pid_path".
fork
fork() : Int
The fork method forks the application and returns a pid.
start
start() : Any
The start method executes the application and exits the program with the proper exit code.
AUTHOR
Al Newkirk, awncorp@cpan.org
LICENSE
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".