GNOME Bugzilla – Bug 375061
cannot open special file whose stat size is 0
Last modified: 2009-08-22 10:31:11 UTC
Hi, on special files like '/proc/cmdline', stat size is 0 but the file is not empty. Nautilus is able to make the thumbnail for that file. If i open the file with gedit, gedit buffer remains empty. I know it's weird, but not all fs operations are implemented for procfs (and for other pseudo filesystems). So if it seems that a file size is 0 because this is was stat reports, gedit should still try to read it. Thanks.
I can reproduce this with gedit-2.16.2, so confirming the bug and changing version field to 2.16.x, although it's most probably a problem in SVN HEAD too. The problem was reported in Gentoo Linux too: http://bugs.gentoo.org/show_bug.cgi?id=141642
We'll prolly switch away from mmapping files and go back to reading them because of stability issues... so this should get automatically fixed
*** Bug 550852 has been marked as a duplicate of this bug. ***
I forgot to close this... in 2.27 we always use gio and proc files are now read fine. It's a bit ugly that gedit actually keeps worning you that the proc file changed since mtime changes all the time, but on the other hand ignoring the mtime changes for all files in proc doesn't sound right either.