There needs to be a call to fcntl(fd,F_SETFL,O_NONBLOCK) just after
the socket() call and error status check.

-Kyle H

On Thu, Nov 6, 2008 at 8:08 AM, Ben Sandee wrote:
> Hi there,
> I'm investigating a case where a customer's prngd service was blocking,
> which by itself is not supposed to happen AFAIK. This was causing a
> hard-to-diagnose startup hang for our code that uses OpenSSL. The call to
> RAND_egd() was blocking in a call to read().
> I would like to address this issue so that even with a misbehaving prngd,
> our code will fail reliably rather than hanging. The documentation for
> RAND_egd() states specifically that non-blocking I/O is used to read from
> the EGD; analysis of the code leads me to believe otherwise, but I'm not
> particularly familiar with networking code.
> Can anyone confirm my suspicions that the reads are indeed taking place
> using blocking sockets and that the documentation is wrong? I believe the
> code in question is in rand_egd.c and the documentation is in the
> RAND_egd.pod (the "Notes" section, second paragraph).
> Thanks!
> Ben

__________________________________________________ ____________________
OpenSSL Project
User Support Mailing List
Automated List Manager