From ca6782aefa6f18b0c5a1369d863c24dbe4ed0f70 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Thu, 12 Feb 2004 13:00:43 +0000 Subject: [PATCH] More realistic kill procedure --- includes/Database.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 ); - } } } -- 2.20.1