lkml.org 
[lkml]   [2001]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: proc file system
Date
Well, to get tail -f to work, minimally you'll have to support
maintaining a fileposition, so tell() and seek() have something useful
to work on. It's been a while since I looked at the source for tail,
pretty much for similar reasons (wanted to follow a /proc file). Most
/proc files are considered (relatively) fixed-length files, who's
contents get updated. tail -f expects to follow a file that is
growing in size.

I don't have sources in front of me, so hopefully someone else will
step-up and provide more detail than I have.

Steve Brueggeman


On Tue, 9 Oct 2001 15:41:34 +0200, you wrote:

>> On Sat, Oct 06, 2001 at 12:02:18AM +0200, llx@swissonline.ch wrote:
>> > i've written a prog interface for my logger utility to make it easy
>> > to transport my logging information from kernel to userspace using
>> > shell commands. now i want to use tail -f /prog/<mylogfile>. what
>> > do i have to do for that to work. when using tail my loginfo gets
>> > read form my ringbuffer, but nothing gets printed in the terminal.
>>
>> I think you actually want a character device instead of a /proc file.
>
>Could you please explain why? I can't see the advantage (read and write
>are fileops; you can have them exactly the same for proc file and device).
>
>--------------------------------------------------------------------------------
> - Jan Hudec `Bulb' <bulb@ucw.cz>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

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

\
 
 \ /
  Last update: 2005-03-22 13:05    [W:0.156 / U:0.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site