Login   Register  
PHP Classes
elePHPant
Icontem

clsDaemonize: Create and manage daemon processes on Unix systems

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Daniel Andres Marjos
Name: Daniel Andres Marjos is available for providing paid consulting. Contact Daniel Andres Marjos .
Packages: 12 Browse all classes by Daniel Andres Marjos Browse all classes by
Country: Argentina Argentina - PHP jobs in Argentina
Age: 43
All time rank: 241 in Argentina Argentina
Week rank: 246 Down4 in Argentina Argentina Down
Innovation award
Innovation award
Nominee: 2x


  Detailed description   Download Download .zip .tar.gz  
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.

  Classes of Daniel Andres Marjos  >  clsDaemonize  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: clsDaemonize
Base name: clsdaemonize
Description: Create and manage daemon processes on Unix systems
Version: -
PHP version: -
License: GNU General Public License (GPL)
All time users: 1792 users
All time rank: 2015
Week users: 3 users
Week rank: 778 Up
 
  Groups   Rate classes User ratings   Applications   Files Files  

  Groups  
Group folder image Unix Use of capabilities specific of POSIX, Unix like operating systems View top rated classes


  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

  User ratings  
RatingsUtility Consistency Documentation Examples Tests Videos Overall Rank
All time: Sufficient (75.0%) Sufficient (75.0%) - Not sure (54.2%) - - Not sure (50.4%) 1565
Month: Not yet rated by the users

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.
  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

Download Download all files: clsdaemonize.tar.gz clsdaemonize.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.