]> granicus.if.org Git - php/commit
fixed readfile() fd-leak.
authorThies C. Arntzen <thies@php.net>
Sun, 14 Jan 2001 14:11:38 +0000 (14:11 +0000)
committerThies C. Arntzen <thies@php.net>
Sun, 14 Jan 2001 14:11:38 +0000 (14:11 +0000)
commit6b84fb1cde6d52e638d1f46c7ce60f9f711c190f
treefd69d0618269dc042c06ba14b6e7acaea26a4015
parent27afea5c6d3e79beea2b512494b7e7639f802410
fixed readfile() fd-leak.

guys, always remember that every function that *generates output* could cause a
bailout if ignore_user_abort is set to false (and the user _aborts_ the
connection). in this case a longjump will be performed and our function (in
this case readfile) will have no chance to clean-up. having said that it's a
good idea to register all opened files using REGISTER_RESOURCE - that way the
engine will make sure they get closed on request end.
ext/standard/file.c