Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libapp-daemon-perl
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Debian Perl Group
M
modules
packages
libapp-daemon-perl
Commits
79e58509
Commit
79e58509
authored
Aug 21, 2010
by
Salvatore Bonaccorso
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[svn-upgrade] new version libapp-daemon-perl (0.10)
parent
d5ab362b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
12 deletions
+13
-12
Changes
Changes
+3
-0
Daemon.pm
Daemon.pm
+7
-9
META.yml
META.yml
+2
-2
README
README
+1
-1
No files found.
Changes
View file @
79e58509
Revision history for Perl extension App::Daemon.
0.10 (08/19/2010)
(ms) Writing pid file before dropping privileges (just like logfile).
0.09 (04/09/2010)
(ms) Fixed find_option example on manual page. Thanks to
Rolf Schaufelberger for pointing it out.
...
...
Daemon.pm
View file @
79e58509
...
...
@@ -2,7 +2,7 @@ package App::Daemon;
use
strict
;
use
warnings
;
our
$VERSION
=
'
0.
09
';
our
$VERSION
=
'
0.
10
';
use
Getopt::
Std
;
use
Pod::
Usage
;
...
...
@@ -82,9 +82,6 @@ sub cmd_line_parse {
DEBUG
"
Log4perl already initialized, doing nothing
";
}
elsif
(
$l4p_conf
)
{
Log::
Log4perl
->
init
(
$l4p_conf
);
}
elsif
(
!
$background
)
{
Log::
Log4perl
->
easy_init
({
level
=>
$loglevel
,
layout
=>
"
%F{1}-%L: %m%n
"
});
}
elsif
(
$logfile
)
{
my
$levelstring
=
Log::Log4perl::Level::
to_level
(
$loglevel
);
Log::
Log4perl
->
init
(
\
qq{
...
...
@@ -134,6 +131,7 @@ sub daemonize {
if
(
$action
eq
"
restart
")
{
sleep
1
;
}
else
{
INFO
"
Process $$ stopped by request.
";
exit
0
;
}
}
...
...
@@ -153,10 +151,6 @@ sub daemonize {
}
};
INFO
"
Process ID is $$
";
pid_file_write
(
$$
);
INFO
"
Written to
$pidfile
";
return
1
;
}
...
...
@@ -167,7 +161,7 @@ sub detach {
umask
(
0
);
# Make sure the child isn't killed when the use
s
closes the
# Make sure the child isn't killed when the use
r
closes the
# terminal session before the child detaches from the tty.
$SIG
{'
HUP
'}
=
'
IGNORE
';
...
...
@@ -186,6 +180,10 @@ sub detach {
# process group leader of a new process group.
POSIX::
setsid
();
INFO
"
Process ID is $$
";
pid_file_write
(
$$
);
INFO
"
Written to
$pidfile
";
if
(
$as_user
)
{
user_switch
();
}
...
...
META.yml
View file @
79e58509
---
#YAML:1.0
name
:
App-Daemon
version
:
0.
09
version
:
0.
10
abstract
:
Start an Application as a Daemon
author
:
-
Mike Schilli <m@perlmeister.com>
...
...
@@ -25,7 +25,7 @@ no_index:
directory
:
-
t
-
inc
generated_by
:
ExtUtils::MakeMaker version
6.5
0
generated_by
:
ExtUtils::MakeMaker version 6.5
5_02
meta-spec
:
url
:
http://module-build.sourceforge.net/META-spec-v1.4.html
version
:
1.4
README
View file @
79e58509
######################################################################
App::Daemon 0.
09
App::Daemon 0.
10
######################################################################
NAME
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment