P
Peter Ballard
Hi all,
I've got a C program which outputs all its data using a statement of
the form:
putchar(ch, outfile);
This has worked fine for years until it had to output more than 2GB of
data today, and I got a "file size limit exceeded" error.
On a whim I tried setting 'outfile' to 'stdout' (and piped output
using the bash '> outfile'), and it worked.
Now since it works, it's not really urgent. But I'm curious: what's
going on here? I've read that the "file size limit exceeded" error is
due to my OS (which is Linux, 2.4 I think), but then why should the OS
care whether the file is opened and closed inside my C program (when
it didn't work) or in bash (when it did work)? Is the problem due to
some pointer size limit in my machine's implementation of C (the
program was compiled using gcc)? Or something else?
Just wondering.
Regards,
Peter Ballard
Adelaide, AUSTRALIA
(e-mail address removed)
http://www.ozemail.com.au/~pballard/
I've got a C program which outputs all its data using a statement of
the form:
putchar(ch, outfile);
This has worked fine for years until it had to output more than 2GB of
data today, and I got a "file size limit exceeded" error.
On a whim I tried setting 'outfile' to 'stdout' (and piped output
using the bash '> outfile'), and it worked.
Now since it works, it's not really urgent. But I'm curious: what's
going on here? I've read that the "file size limit exceeded" error is
due to my OS (which is Linux, 2.4 I think), but then why should the OS
care whether the file is opened and closed inside my C program (when
it didn't work) or in bash (when it did work)? Is the problem due to
some pointer size limit in my machine's implementation of C (the
program was compiled using gcc)? Or something else?
Just wondering.
Regards,
Peter Ballard
Adelaide, AUSTRALIA
(e-mail address removed)
http://www.ozemail.com.au/~pballard/