Re: lseek on /proc/kmsg

From: linux-os
Date: Tue Mar 22 2005 - 14:37:13 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/