lkml.org 
[lkml]   [2005]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: lseek on /proc/kmsg
On Tue, 22 Mar 2005, Jan Engelhardt wrote:

> Hi,
>
>> how am I supposed to clear the kmsg buffer since it's not a terminal??
>
> fd = open("/proc/kmsg", O_RDONLY | O_NONBLOCK);
> while(read(fd, buf, sizeof(buf)) > 0);
> if(errno == EAGAIN) { printf("Clear!\n"); }
>
> This is language (spoken-wise) neutral :p
>

Gawd, you are a hacker. I already have to suck on pipes
because I can't seek them. Now, I can't even seek a
file-system???!!

>
>
> Jan Engelhardt
> --
>

Cheers,
Dick Johnson
Penguin : Linux version 2.6.11 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by Dictator Bush.
98.36% of all statistics are fiction.
-
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-04-06 13:30    [W:0.043 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site