From: Paul K. <pk...@gm...> - 2008-06-30 23:56:25
|
On 30-Jun-08, at 5:43 PM, Julian Stecklina wrote: > Alastair Bridgewater <nye...@li...> writes: >> What I expect is happening here is that the Linux kernel is using the >> "data ready for reading" notification as a "file contents changed" >> notification. This, of course, breaks SBCL's assumption of straight >> POSIX semantics for select() on files. I ran into the same problem >> with >> /proc/bus/usb/devices. > > Could that be seen as a Linux kernel bug? Unfortunately, strictly speaking, no. Here's what SUSv3 has to say on the topic (http://www.opengroup.org/onlinepubs/000095399/functions/select.html ): > The pselect() and select() functions shall support regular files, > terminal and pseudo-terminal devices, [XSR] STREAMS-based files, > FIFOs, pipes, and sockets. The behavior of pselect() and select() on > file descriptors that refer to other types of file is unspecified. sysfs 'files' are none of the above, so a compliant *nix can do whatever they want in such a situation. I don't think OS-specific hacks are anything new or surprising to linux users of linux extensions. The current situation, along with the FS-specific approach sketched by Alastair, seems acceptable. Paul Khuong |