2011/7/12 Dario Lesca <d.le...@solinos.it>:
> Hi, how to I can read in safe mode, from bash, the content
> of /proc/locks?
>
> On my system I have more than 7000/9000 line into /proc/locks and if I
> read it with awk (or cat or grep or cp) the file change during the read
> and my input is undefined and is not processable (see attach).

Interesting, because afaiu, in recent kernels reading /proc/locks
line-wise should not yield broken records, as the code in fs/locks.c
uses the seq_file abstraction. See
http://stackoverflow.com/questions/5713451/is-it-safe-to-parse-a-proc-file/5880485#5880485.
What is the kernel version you are seeing that on?

- Thomas
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Reply via email to