PHP Classes

Daemon: Create and control Unix daemon processes

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (4)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 61%Total: 4,155 All time: 731 This week: 571Up
Version License Categories
daemon 1.0.0GNU General Publi...Unix
Description 

Author

This package provides a base class that can create and manage daemon processes on Linux or other Unix-like systems.

This base class can fork the current process and store the child process identifier in a pid file. The forked process enters an infinite loop executing its job until it receives a termination signal.

The base class is not useful by itself. It needs to be derived to implement daemon job as a function of the sub-class. A daemon job subclass is provided as an example.

Innovation Award
PHP Programming Innovation award nominee
March 2005
Number 2


Prize: One copy of the Zend Studio
Many sites need to run background tasks to execute the jobs that are important for their operation, like for instance, process incoming e-mail, deliver newsletters and other kinds of mailings, monitor the usage of resources, cleanup or backup information, etc..

Some background tasks need to run continually in order to provide a prompt response to events that may happen anytime. Under Linux and other Unix-like systems the programs that run continually to perform this kind of tasks are called daemons.

This class simplifies the creation and management of daemon processes making them work like common Unix daemon programs by, among other things, storing the daemon process in a file and cleanup and exit when receiving the termination signal.

Manuel Lemos
Picture of Michal Golebiowski
Name: Michal Golebiowski <contact>
Classes: 2 packages by
Country: Poland Poland
Age: 40
All time rank: 39110 in Poland Poland
Week rank: 416 Down12 in Poland Poland Down
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Accessible without login Plain text file Daemon.class.php Class Daemon base class
Plain text file test.php Example Main test file
Plain text file TestDaemon.class.php Example Test daemon

 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,155
This week:0
All time:731
This week:571Up
 User Ratings  
 
 All time
Utility:90%StarStarStarStarStar
Consistency:84%StarStarStarStarStar
Documentation:-
Examples:79%StarStarStarStar
Tests:-
Videos:-
Overall:61%StarStarStarStar
Rank:984