cvs: pear-core(PEAR_1_3) /PEAR Registry.php

From: Date: Fri, 22 Oct 2004 06:03:36 +0000
Subject: cvs: pear-core(PEAR_1_3) /PEAR Registry.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-1118@lists.php.net to get a copy of this message
cellog Fri Oct 22 02:03:36 2004 EDT Modified files: (Branch: PEAR_1_3) /pear-core/PEAR Registry.php Log: possibly fix #2370 each time lock() was called, a new file handle was created, and it was never fclosed(). close file handles on unlock() now http://cvs.php.net/diff.php/pear-core/PEAR/Registry.php?r1=1.50&r2=1.50.4.1&ty=u Index: pear-core/PEAR/Registry.php diff -u pear-core/PEAR/Registry.php:1.50 pear-core/PEAR/Registry.php:1.50.4.1 --- pear-core/PEAR/Registry.php:1.50 Thu Jan 8 12:33:12 2004 +++ pear-core/PEAR/Registry.php Fri Oct 22 02:03:36 2004 @@ -18,7 +18,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Registry.php,v 1.50 2004/01/08 17:33:12 sniper Exp $ +// $Id: Registry.php,v 1.50.4.1 2004/10/22 06:03:36 cellog Exp $ /* TODO: @@ -286,7 +286,9 @@ $open_mode = 'r'; } - $this->lock_fp = @fopen($this->lockfile, $open_mode); + if (!is_resource($this->lock_fp)) { + $this->lock_fp = @fopen($this->lockfile, $open_mode); + } if (!is_resource($this->lock_fp)) { return $this->raiseError("could not create lock file" . @@ -312,6 +314,7 @@ function _unlock() { $ret = $this->_lock(LOCK_UN); + fclose($this->lock_fp); $this->lock_fp = null; return $ret; }

« previous php.pear.core (#1118) next »