>> The "files" in /proc should in my opinion not pretend to be files:
>> they should be "pipes". Many programs stat their input file, and if
>> they get "normal file", they have all sorts of assumptions on tricks
>> they can do.
>>
>> For example, "wc -c" will just return the st_size of the file, instead
>> of doing all the work that is normally involved in counting the file.
>
> Just for kicks, I changed them all to pipes, i.e., named FIFOS. This
> broke most of the tools like 'ps`. I gave up.
Don't give up. I'll guess that 'ps' broke because the kernel wouldn't
let it seek. Since 'ps' shares code with 'top', it keeps a few files
open for performance.
Applications should see the /proc files as named FIFOs, but lseek()
must be supported. I'd rather have seekable FIFOs than zero-length
files full of data.
-
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/