linux-os wrote:
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???!!

I'm not sure that seek makes any sense on that, since it is more like a pipe than a normal file..


--
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from [EMAIL PROTECTED]
Home Page: http://www.roberthancock.com/

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

Reply via email to