Bug 59612 - tee does not open its outputfile with O_LARGEFILE
Summary: tee does not open its outputfile with O_LARGEFILE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: sh-utils
Version: 7.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Ben Levenson
Depends On:
TreeView+ depends on / blocked
Reported: 2002-02-11 09:05 UTC by Jan Christiaan van Winkel
Modified: 2007-04-18 16:40 UTC (History)
0 users

Clone Of:
Last Closed: 2002-02-11 09:05:09 UTC

Attachments (Terms of Use)

Description Jan Christiaan van Winkel 2002-02-11 09:05:03 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.79 [en] (X11; U; SunOS 5.8 sun4u; Nav)

Description of problem:
tee does not open its outputfile with O_LARGEFILE.  It is the only command I
have seen that has this behavior.
The behavior can easily be verified with:
date | strace -eopen -f sh -c 'tee bytee > bysh'
The relevant output is:
[pid 17444] open("bysh", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
[pid 17444] open("bytee", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
The shell correctly opens the file with O_LARGEFILE.
Other utilities, such as uniq and sort not not have the bad behavior

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. date | strace -eopen -f sh 'tee bytee > bysh'

Actual Results:  strace shows the file created by tee is not opend with
Files opend by the shell *are* opened with O_LARGEFILE.  This the open file
cannot be larger than 2 GB

Expected Results:  The file should have been opened with O_LARGEFILE.  Files
created by tee should be able to grow beyond the 2G border

Additional info:

Comment 1 Bernhard Rosenkraenzer 2002-02-12 15:34:23 UTC
True, fixed in 2.0.11-10 

Note You need to log in before you can comment on or make changes to this bug.