ID: 25429 Updated by: [EMAIL PROTECTED] Reported By: devik at cdi dot cz -Status: Open +Status: Assigned Bug Type: Filesystem function related Operating System: linux PHP Version: 4.3.3 -Assigned To: +Assigned To: wez
Previous Comments: ------------------------------------------------------------------------ [2003-09-08 05:20:17] devik at cdi dot cz Description: ------------ copy("/dev/stdin","/tmp/xx"); was working in 4.0.6 but in 4.3.3 it results in empty file. When I ran strace then I see fstat64(2) used on handle 4 which is dup(2)ed from handle 0. It results to fs_size==0 and code in php_stream_copy_to_stream (IIRC) hapily creates zero-sized file (immeditely - no wait for EOF). With PHP fopen() it works as expected (it waits). Reproduce code: --------------- copy("/dev/stdin","/tmp/xx"); Expected result: ---------------- to stop on copy() and wait to EOF and then have input in /tmp/xx Actual result: -------------- copy() passes and /tmp/xx is zero-length file ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25429&edit=1