[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9800: Incomplete truncated file buffers from the /proc filesystem
From: |
Ruijie Yu |
Subject: |
bug#9800: Incomplete truncated file buffers from the /proc filesystem |
Date: |
Sun, 12 Feb 2023 17:24:51 +0800 |
There is /proc/config.gz which does report a size, contrary to other files
which report a size of 0.
> On Feb 12, 2023, at 15:41, Eli Zaretskii <eliz@gnu.org> wrote:
>
>
>>
>> From: Andreas Schwab <schwab@linux-m68k.org>
>> Date: Thu, 20 Oct 2011 10:44:57 +0200
>> Cc: Juri Linkov <juri@jurta.org>, 9800@debbugs.gnu.org
>>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>>> Does lseek work on these files?
>>
>> No. The contents are completely dynamic, generated on-the-fly when
>> reading.
>>
>>> Or we could treat those files as non-regular,
>>
>> That is the only option.
>
> Are all the files in "/proc" of this nature? If so, we could consider
> all of the files in that directory non-regular; if that is all that's
> needed to visit /proc/foo files, insert-file-contents already has code
> to deal with non-regular files.
>
> Paul, do you see any downsides to such heuristic? We could make it a
> user option if the heuristic could sometimes backfire, I guess.
Best,
RY