From: Tim Starling Date: Thu, 12 Feb 2004 13:00:43 +0000 (+0000) Subject: More realistic kill procedure X-Git-Tag: 1.3.0beta1~990 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=ca6782aefa6f18b0c5a1369d863c24dbe4ed0f70;p=lhc%2Fweb%2Fwiklou.git More realistic kill procedure --- diff --git a/includes/Database.php b/includes/Database.php index 3d24642256..75b4eb3ee1 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -389,16 +389,14 @@ class Database { function startTimer( $timeout ) { - $thisdir = dirname( getenv( "SCRIPT_FILENAME" ) ); + global $IP; + $tid = mysql_thread_id( $this->mConn ); - $this->mTimerProc = popen( "php $thisdir/killthread.php $timeout $tid &", "w" ); + exec( "php $IP/killthread.php $timeout $tid &>/dev/null &" ); } function stopTimer() { - if ( $this->mTimerProc ) { - pclose( $this->mTimerProc ); - } } }