#36719 [Opn->Bgs]: is_file failes to see the file has gone

From: Date: Mon, 13 Mar 2006 14:43:45 +0000
Subject: #36719 [Opn->Bgs]: is_file failes to see the file has gone
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-94283@lists.php.net to get a copy of this message
 ID:               36719
 Updated by:       tony2001@php.net
 Reported By:      phpbugs at lowvoice dot nl
-Status:           Open
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: linux
 PHP Version:      5.1.2
 New Comment:

Use http://php.net/clearstatcache.


Previous Comments:
------------------------------------------------------------------------

[2006-03-13 15:31:43] phpbugs at lowvoice dot nl

Description:
------------
is_file failes to see the file has gone
i wanted to have a script run as long as a file existed, on removing
the file is_file was supposed to fail and my program should break out
of the loop

Reproduce code:
---------------
test.php:

<?
while (is_file('foo')){
 echo "still there\n"; 
 sleep(1);
}
?>


shellcode:
#> touch foo
#> php test.php &
still there
still there
still there
..
#> rm foo
still there
still there
..



Expected result:
----------------
It should have stopped after rm foo



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36719&edit=1


Thread (2 messages)

« previous php.bugs (#94283) next »