> From: John Hughes [mailto:[EMAIL PROTECTED]]

> > Sounds like the threading engine in UW is using timer interrupts. 
> >  This may cause other "slow" system calls to EINTR-out, too, so
> > OpenSSL may need EINTR loops around socket reads and writes (if
> > it doesn't already have them).

> Nope, not timer interrupts, it was a SIGWAITING - "all LWPs blocked
> interruptibly notification", I guess telling the threading library
> that it should look for a new thread to run.

Right.  That was in the original message too - I should have looked it over
more carefully before responding.  It's the same syndrome with a slightly
different cause, of course; the threading implementation periodically
generates signals, which cause slow system calls to fail with EINTR (or its
equivalent).

> What I don't understand is that produced an ERESTART from connect
> which should of "automaticaly" rerun the connect, but it didn't.

That depends on whether the platform has "restartable" slow system calls.
(There's a good discussion of this in Stevens' _Advanced Programming in the
Unix Environment_; it's one of the historical BSD/USL differences.)  On some
platforms, you can control whether slow system calls restart (rather than
failing with EINTR) when particular signals are raised, using flags to
sigaction.  I don't recall offhand whether UW is one.

Personally, I prefer the EINTR loop, since it's more portable than relying
on slow call restart.

Michael Wojcik             [EMAIL PROTECTED]
MERANT
Department of English, Miami University
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to