Re: daemon without pcntl_fork

From: Date: Wed, 19 Aug 2009 08:18:30 +0000
Subject: Re: daemon without pcntl_fork
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-296955@lists.php.net to get a copy of this message
Jim Lucas wrote: > Currently, I have two different uses for this startup script and > daemon/bg process. > > One will deal with a master server for one of my games and the second > will be for running a PBX SMDR/CDR capturing tool. > > The first must be able to deal with multiple simultaneous connections > where as the second simply need to listen on the local serial port, > connect to a remote IP:PORT, or attach itself to a IP:PORT > and wait for input from another machine to be sent to it. Once it > receives the data, it simply parses it, sanitizes it, and stores it. I probably wouldn't have chosen PHP for the first one, but there's no reason it shouldn't work. For the second one, did you mean to write "serial port"? That's a bit of a different animal, I'm not sure how far you'll get with php. > Here is what I have come up with so far. Looks to satisfying my > needs: > > tms_daemon [snip] > # END OF SCRIPT Looks good to me. It'll certainly do the job. /Per -- Per Jessen, Zürich (22.5°C)

« previous php.general (#296955) next »