PHP Classes
elePHPant
Icontem

clsDaemonize: Create and manage daemon processes on Unix systems

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2004-06-03 (13 years ago) RSS 2.0 feedStarStarStar 53%Total: 1,825 All time: 2,106 This week: 634Up
Version License Categories
clsdaemonize 1.0GNU General Publi...Unix
Description Author

This class is intended to automate the creation of system daemons proceses under Unix like operating systems or those with POSIX compliant API like Linux, OpenBSD, FreeBSD, Solaris, Mac OS X, etc...

It can fork a new process using the PHP pcntl extension and detach from the starting shell so it can exit without killing the daemon process.

It can maintain a file that stores the daemon process identifier to prevent that more than one copy of the daemon is started.

It also creates a log file to register the daemon activity.

It is also possible register PHP callback functions to handle different types of signals.

Innovation Award
PHP Programming Innovation award nominee
June 2004
Number 7
A daemon is what are usually called the programs that run on their own under Unix/Linux based systems.

Thy usually implement services of handling events that may occur any time. Examples of daemon services include network connection handlers, mail processors, print spoolers, etc..

This class provides a solution that simplifies the implementation common details of operation of daemons, like being able to detach from the shell process that started it and so not end even if the starting process exits, assure that only one copy of the same daemon is running, handle signals that request termination, etc..

Even though running daemon scripts is not the a common use of PHP, this class simplifies the development of new useful daemons that may enhance the value of many PHP applications.

Manuel Lemos
  Performance   Level  
Name: Daniel Andres Marjos <contact>
Classes: 13 packages by
Country: Argentina Argentina
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Plain text file clsDaemonize.php Class Main Class file
Accessible without login Plain text file test_daemon.php Example Example Script

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,825
This week:0
All time:2,106
This week:634Up
 User Ratings  
 
 All time
Utility:78%StarStarStarStar
Consistency:78%StarStarStarStar
Documentation:-
Examples:60%StarStarStarStar
Tests:-
Videos:-
Overall:53%StarStarStar
Rank:1967