<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Proc::PID_File - manage PID files

SYNOPSIS
     use Proc::PID_File;

     $pid_file = Proc::PID_File-&gt;new(path=&gt;"/var/log/mydaemon.pid");
     if (!$pid_file-&gt;create) { die "Can't create pid file"; }
     if ($pid_file-&gt;previously_exists) { die "I was already started."; }

     $SIG{INT} = $SIG{TERM} = sub { $pid_file-&gt;delete; exit; };

     # go ahead, daemonize...

DESCRIPTION
    This module provides a simple interface to manage PID files. A
    PID file is a place to store the process ID number of a process,
    created by the process itself when it starts. A valid (i.e. not
    stale) PID file indicates that the process instance is still
    alive, and can indicate that the program should not start
    another instance when invoked. PID files are also used to record
    the process ID number of daemon processes so that they can be
    signalled (e.g. TERM-ed or HUP-ed).

AUTHOR
    Copyright (C) 2000, Steven Haryanto &lt;steven@haryan.to&gt;. All
    rights reserved.

    This module is free software; you may redistribute it and/or
    modify it under the same terms as Perl itself.

HISTORY
    000731 - first hack

</pre></body></html>