Matthieu FEREYRE wrote:
kill -USR1 apache_pid
do that extremly well but apache doesn't have the rights to launch it
from perl !
Try writing a script which does it - eg.
#!/bin/sh
/etc/init.d/apache restart
put that somewhere and make it setuid root, then in your perl code call
system("/path/to/your/script &");
which would launch it in the background and return control sensibly, I
think.
The 2 flaws are [1] you have no way to feed back success to the user -
you could put a Refresh header in the returned page to jump to a status
page - and [2] any script or user on your server would be able to
restart it by running the setuid root script.
cheers
John