
On Thu, Dec 6, 2012 at 5:14 PM, Donn Cave
While I guess /dev/urandom isn't supposed to block, so it would look about the same to select(2) either way, /dev/random is select-able, true?
Both should be cdevs, not files, so they do not go through the normal filesystem I/O pathway in the kernel and should support select()/poll(). ("ls -l", the first character should be "c" instead of "-" indicating character-mode device nodes.) If ghc is not detecting that, then *that* is indeed an I/O manager issue. More generally, anything which is not a regular file according to stat() (in practice this means block devices, character devices, and fifos; directories, sockets, doors, Xenix name files, and other exotics in the filesystem namespace are not generally accessible via standard I/O routines and should probably be failed on open --- in fact, you may have a kernel bug if the system does not fail them on open) should go through the I/O manager. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net