files > 2GB
Miquel van Smoorenburg
miquels en cistron.nl
Mar Ene 25 16:18:02 CST 2000
In article <cistron.Pine.LNX.4.10.10001251153450.7863-100000 en ps.cus.umist.ac.uk>,
Riley Williams <rhw en MemAlpha.CX> wrote:
> Q. What should the kernel do when, in the middle of executing a
> function that returns a 32-bit off_t value, it finds itself
> referring to a file whose length is too large to be stored in
> such a value?
You can only open files >= 2GB if you pass the O_LARGEFILE flag
to open(2). Otherwise open() will simply fail. As legacy apps do
not set O_LARGEFILE, there is no problem.
If you do open a file >= 2GB with O_LARGEFILE but then use stat()
instead of stat64(), the results are probably not defined. And
the kernel may choose to exec /usr/local/bin/nethack at that point.
Mike.
--
The From: and Reply-To: addresses are internal news2mail gateway addresses.
Reply to the list or to miquels en cistron.nl (Miquel van Smoorenburg)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Más información sobre la lista de distribución Ayuda