|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-09-09 20:58 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 12:00:01 2025 UTC |
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