/proc/kmsg blocks with O_NONBLOCK, read() should return 0 with EAGAIN
From: Graham Swallow
Date: Mon Feb 23 2004 - 07:25:09 EST
/proc/kmsg blocks with O_NONBLOCK, read() should return 0 with EAGAIN
fd = open( "/proc/kmsg", O_RDONLY|O_NONBLOCK );
...
poll() -- says read it
len = read(fd,buff,len); // first read is fine
...
len = read(fd,buff,len); // second read blocks
I call read() a second time, because I'm feeling lucky,
(this is library code, which also reads from sockets).
I expected it to return 0 with errno==EAGAIN.
Instead it waits: do_syslog(2,buf,count);
I'm not on this list, so please raise a ticket, linux-2.4.23,
thanks
--
Graham
Information-Cascade (at) ntlworld.com
-
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/