Re: lseek on /proc/kmsg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux