haskell-crypto / cryptonite

lowlevel set of cryptographic primitives for haskell
Other
226 stars 139 forks source link

ignoring exceptons from hClose to read the next entropy #374

Closed kazu-yamamoto closed 1 year ago

kazu-yamamoto commented 1 year ago

The following error occurs when "tls" used heavily:

   uncaught exception: IOException of type NoSuchThing
       /dev/random: hClose: does not exist (No such file or directory)

To read "/dev/urandom" next, I think we need to ignore exceptions from hClose.

I don't understand why "close(2)" returns ENOENT (aka NoSuchThing in Haskell).