You're viewing old version number 1. - Current version

Run perl script as a daemon

http://stackoverflow.com/questions/766397/how-can-i-run-a-perl-script-as-a-system-daemon-in-linux

http://search.cpan.org/~deti/Proc-Daemon-0.14/lib/Proc/Daemon.pod


#!/usr/bin/perl

use strict;
use warnings;
use Proc::Daemon;

Proc::Daemon::Init;

my $continue = 1;
$SIG{TERM} = sub { $continue = 0 };

while ($continue) {
     <a href="/cgi-bin/junco.pl/tag/do">#do</a> stuff
}

#perl - #programming - #howto

From JR's : articles
34 words - 412 chars
created on - #
source - versions

Related articles
Run perl script as a daemon - Nov 14, 2014
Loop through a Perl array - Oct 02, 2013
Perl links to read - Jul 09, 2013
Installing a Perl Module - Jan 13, 2015
Perl programming tools to test - Nov 14, 2014
more >>



A     A     A     A     A

© 2013-2017 JotHut - Online notebook

current date: May 19, 2024 - 1:21 a.m. EDT