Bug 67662 - pdksh does not properly open files during I/O redirection to files to take advantage of >2GB files
Summary: pdksh does not properly open files during I/O redirection to files to take ad...
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: pdksh
Version: 7.2
Hardware: i386
OS: Linux
low
low
Target Milestone: ---
Assignee: Trond Eivind Glomsrxd
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-06-28 17:55 UTC by Craig Dawson
Modified: 2008-05-01 15:38 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2002-06-28 17:55:19 UTC


Attachments (Terms of Use)

Description Craig Dawson 2002-06-28 17:55:15 UTC
Description of Problem:

When running the ksh shell, redirecting output to a file that is >2GB will fail
with the following text:

echo "test" >> /tmp/largefile.out
ksh: cannot create /tmp/largefile.out: File too large

When using bash, the same operation works fine.

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

5.2.14-13

How Reproducible:

Try and create a file that is greater than 2GB

cat /dev/zero > /tmp/largefile.out

- will fail with "File size limit exceeded"

Actual Results:


Resulting file size will be:

-rw-r--r--    1 root     sys      2147483647 Jun 28 13:48 largefile.out

Expected Results:

File should be able to grow beyond 2GB in size.

Additional Information:
	
A solution that I have found is to compile the pdksh source using the following
gcc flags:

-D_FILE_OFFSET_BITS=64 and -D_LARGEFILE_SOURCE 

Doing this will allow ksh to redirect output to greater than 2GB files without
any problems.

Comment 1 Trond Eivind Glomsrxd 2002-06-28 18:28:57 UTC
Added in pdksh-5.2.14-19


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