
###
PID
###


****
NAME
****


Kernel::System::PID - to manage PIDs


***********
DESCRIPTION
***********


All functions to manage process ids


****************
PUBLIC INTERFACE
****************


new()
=====


Don't use the constructor directly, use the ObjectManager instead:


.. code-block:: perl

     my $PIDObject = $Kernel::OM->Get('Kernel::System::PID');



PIDCreate()
===========


create a new process id lock


.. code-block:: perl

     $PIDObject->PIDCreate(
         Name => 'PostMasterPOP3',
     );
 
     or to create a new PID forced, without check if already exists (this will delete any process
     with the same name from any other host)
 
     $PIDObject->PIDCreate(
         Name  => 'PostMasterPOP3',
         Force => 1,
     );
 
     or to create a new PID with extra TTL time
 
     $PIDObject->PIDCreate(
         Name  => 'PostMasterPOP3',
         TTL   => 60 * 60 * 24 * 3,  # for 3 days, per default 1h is used
     );



PIDGet()
========


get process id lock info


.. code-block:: perl

     my %PID = $PIDObject->PIDGet(
         Name => 'PostMasterPOP3',
     );



PIDDelete()
===========


delete the process id lock


.. code-block:: perl

     my $Success = $PIDObject->PIDDelete(
         Name  => 'PostMasterPOP3',
     );
 
     or to force delete even if the PID is registered by another host
     my $Success = $PIDObject->PIDDelete(
         Name  => 'PostMasterPOP3',
         Force => 1,
     );



PIDUpdate()
===========


update the process id change time.
this might be useful as a keep alive signal.


.. code-block:: perl

     my $Success = $PIDObject->PIDUpdate(
         Name => 'PostMasterPOP3',
     );





