I have a MediaWiki extension that invokes a Windows command-line program
(gnuplot.exe) to do some processing. If the MediaWiki user clicks the
browser "stop" button in the middle of processing, or closes the
browser, the external program does not die. It hangs around until you
eventually restart Apache.
What is the proper way to ensure that the external program is killed
when the user clicks the browser's stop button, or closes the browser?
Is this possible?
Specifically, my extension invokes code from the GNUplot extension
(
http://meta.wikimedia.org/wiki/Gnuplot):
require_once("gnuplot.php");
...
$output = renderGnuplot($gnuplotSrcString);
renderGnuplot() does a shell_exec().
I suppose "timing out" would be an OK solution (say, after 1 minute).
DanB