ID:               49015
 Updated by:       j...@php.net
 Reported By:      tsc at netuse dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         *Directory/Filesystem functions
 Operating System: SUSE LINUX 10.0
 PHP Version:      5.3.0
 New Comment:

You're not closing stdout there. You're closing stream opened to 
php://stdout which is different to what PHP itself uses, a.k.a. STDOUT.

See also bug #44217


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

[2009-07-22 13:43:02] tsc at netuse dot de

Description:
------------
Description:
------------
This is the same bug as reported and fixed for PHP5
http://bugs.php.net/bug.php?id=27865 and 32107 , but is still present
in 5.3.0.

PHP doesn't close STDIN,STDOUT,STDERR correct.

I have the same Issues on Ubuntu 6 LTS.

Reproduce code:
---------------
<?php

$stdout = fopen("php://stdout",w);

fclose($stdout);

/* This now fails..*/
fwrite ($stdout, "Test");

/* but this still works: */
echo "Stdout still open\n";

/*
 * Standard output is still open.
 * The process is therefore unable to detach from its terminal.
 * See PHP Bug #27865,32107 (PHP5, fixed)
 */

?>


Expected result:
----------------
X-Powered-By: PHP/5.3.0
Content-type: text/html

<br />
<b>Warning</b>:  fwrite(): 3 is not a valid stream resource in
<b>/srv/www/wwwenv3.0/sbin/test_fork.php</b> on line <b>8</b><br />
Stdout still open




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


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

Reply via email to