Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
Operating System: ReactOS
Platform: x86 Hardware
Description
Created an attachment (id=5973)
corrects overwrites in cmdutils/tee
When executing tee,
it doesn't truncate output files before writing.
Example:
<name> <size>
file1 100
file2 300
cat file1 | tee file2
Result:
file1 100
file2 300 (100 first bytes overwritten by contents of file1).
must be:
file1 100
file2 100
In NT and UNIX versions of tee truncation is implemented.
Also POSIX-2001 standard tells that standard input
must be copied to each of the files, including stdout (truncate and write).
I've attached diff-patch.