files in `proc' have zero size, yet are not `special'; is this a bug?

Eric Hanchrow (offby1@blarg.net)
29 Sep 1999 07:58:20 -0700


I recently noticed that I could not examine the "contents" of
/proc/devices by visiting it in GNU Emacs, whereas I could of course
just type `cat /proc/devices' and see the contents. (When I visit the
file in Emacs, I see an empty buffer, but expected to see the same
data I'd have seen if I'd run `cat'). I figured this must be a bug in
Emacs, and sent in a bug report, but RMS (one of the Emacs developers)
thinks it's a bug in the Linux kernel. He says that, since `stat'
doesn't claim that `/proc/devices' is a special file, Emacs looks at
the size info that `stat' returns, sees that the file is zero bytes
long, and thus presents me with an empty buffer. He also says that if
`stat' were to claim that `/proc/devices' is a special file, Emacs
would be able to read its contents (apparantly Emacs knows how to deal
with special files).

Anyway, does this sound like a kernel bug? It would be nice if I
could examine the /proc files in Emacs just as I do any other file.

Thanks

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/