in reply to How to get a persistent daemons after exiting the session?

1) You can use Proc::Daemon:

This module contains the routine Init which can be called by a perl program to initialize itself as a daemon. A daemon is a process that runs in the background with no controlling terminal. Generally servers (like FTP and HTTP servers) run as daemon processes.

An example useful to understand the technique behind this can be found in perlipc, under section Background Processes

2) Proc::PID::File instead is useful for writers of daemons and other processes that need to tell whether they are already running.

HTH, Valerio

  • Comment on Re: How to get a persistent daemons after exiting the session?