Re: new/different problem in shutdown
| From: | Andi Gutmans | Date: | Fri, 06 Jul 2001 16:13:09 +0000 |
| Subject: | Re: new/different problem in shutdown | ||
| References: | 1 2 3 4 5 6 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-59106@lists.php.net to get a copy of this message | ||
I haven't checked it but something like the following might give you a problem.
Andi
<?
function any($fh){
exit(); // exit in a function is noo good...}
$fp = fopen("/tmp/1","r");
$fp && any($fp);
?>
At 05:35 PM 7/6/2001 +0200, Thies C. Arntzen wrote:
On Fri, Jul 06, 2001 at 05:39:18PM +0300, Andi Gutmans wrote: At 04:31 PM 7/6/2001 +0200, Thies C. Arntzen wrote:On Fri, Jul 06, 2001 at 05:12:07PM +0300, Andi Gutmans wrote:counts ofitThies, I have thought about your problem. Your patch fixed your test case butwon't fix all test cases. It is pretty much impossible to make sure on bailout (including exit() and errors) that all of the referenceBecause as I mentioned there might be locked variables which aren't in the call stack. This is what I could think of right now but there might be other problems too.i don't understand why we cant go thru the call-stack and del-ref all the arguments? we're shutting down anyhow - right? also i'm *not talking* about bail at all - bail dosn't work anyhow - and there's no good way to fix it IMHO. but what needs to work is calling exit() from a function if there are resources somewhere on the stack.the variables will go down to 0 even if we clean the call stack. This is due to necessary internal locking of variables in Zend.could you send me a php-snippet that shows this problem - i'd like to "dig". re, tc