Cannot open file "/dev/urandom" OS Explanation: (errno == 0) Success

Tomas Hlavaty tom at logand.com
Mon Apr 20 20:13:33 UTC 2015


Hi Jean-Claude,

it is not possible to open /dev/urandom:

   (with-open-file (s "/dev/urandom" :element-type '(unsigned-byte 8))
     (read-byte s))

   Filesystem error with pathname: "/dev/urandom".
   Cannot open file
   OS Explanation: (errno == 0) Success
      [Condition of type SI:OS-FILE-ERROR]

but this works:

   (with-open-file (s "/etc/passwd" :element-type '(unsigned-byte 8))
     (read-byte s))

Thank you,

Tomas



More information about the mkcl-devel mailing list