More realistic kill procedure
authorTim Starling <tstarling@users.mediawiki.org>
Thu, 12 Feb 2004 13:00:43 +0000 (13:00 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Thu, 12 Feb 2004 13:00:43 +0000 (13:00 +0000)
includes/Database.php

index 3d24642..75b4eb3 100644 (file)
@@ -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 );
-               }
        }
 
 }