Restarting a daemon in PHP

From: Date: Thu, 12 Dec 2002 08:41:08 +0000
Subject: Restarting a daemon in PHP
Groups: php.general 
Request: Send a blank email to php-general+get-127972@lists.php.net to get a copy of this message
Hi, I'm trying to write a webinterface that allows helldesk to restart a daemon in case it crashes. I use the following commands: if ($action == "restartsnrdaemon") { print "<p>Stopping old daemon processes<br>\n"; exec("killall snrdaemon.pl"); print "<p>Starting the process again...<br>\n"; shell_exec("perl /var/www/nocbeamer/includes/snrdaemon.pl"); } It works just fine, the daemon is started, but apache does not respond any more in the current session. Only if I close the brower and restart it, I can access the website again. Does anyone know of a good workaround? Thanks in advance, Daniel

« previous php.general (#127972) next »