We have no code for "special". If you want to indicate that, make the proc
entries e.g. named pipes (which I would strongly oppose by the way. I'd rather
go the way of making /proc behave more like real files).
Size 0 means "at that moment you did the stat, the file was empty"
Fixing NFS would be wrong here, since concluding the file is empty if the size
is zero is a VALID thing to do. It's the reporting of size 0 of /proc that's
wrong.
>
> [Note that silly mmap implementations of (for example) cp may have
> problems with zero-length files, as well. They would have the same
> troubles with 'finite but wrong' sized files, except the bugs would be
> much more subtle.]
> --Scott
These implementations of cp are RIGHT. And no, we wouldn't have that
problem with finite sized files, because you may NOT conclude that
if you asked the size and later really read it, it will still have that
size. Zero is special in that if you know the size, you know the full
contents, which is not true for any other number, in all other cases the
program HAS to read the contents to avoid a race.
I see this argument as another reason to fix /proc
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu