Bug 59612 - tee does not open its outputfile with O_LARGEFILE
tee does not open its outputfile with O_LARGEFILE
Product: Red Hat Linux
Classification: Retired
Component: sh-utils (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2002-02-11 04:05 EST by Jan Christiaan van Winkel
Modified: 2007-04-18 12:40 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-02-11 04:05:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jan Christiaan van Winkel 2002-02-11 04:05:03 EST
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 10:34:23 EST
True, fixed in 2.0.11-10 

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