controlling a php-deamon, sort of
Posted: Wed Jan 08, 2003 5:01 pm
Ok, here it is:
I wonder if there is any way to get the process-id of a backgroundprocess thrown in a php-script using exec.
So that I, on every 'some'-request check if a backgroundscript is running and if not make sure it does start running.
Background:
I'm building an alpha of a webgame which will be built in the following way:
-A deamon (written i php, since my host wont allow C-executables) that does things and updates a Db.
-A server that handles the user requests
-A Db to store the current status of a lot of things, and also stores tasks for the deamon to do,
-A web-app (also written in php) that queries the Db for data and also writes tasks for the deamon in the Db.
/Tomas
I wonder if there is any way to get the process-id of a backgroundprocess thrown in a php-script using exec.
So that I, on every 'some'-request check if a backgroundscript is running and if not make sure it does start running.
Background:
I'm building an alpha of a webgame which will be built in the following way:
-A deamon (written i php, since my host wont allow C-executables) that does things and updates a Db.
-A server that handles the user requests
-A Db to store the current status of a lot of things, and also stores tasks for the deamon to do,
-A web-app (also written in php) that queries the Db for data and also writes tasks for the deamon in the Db.
/Tomas