I don't think the code you show is enough to explain the problem. SSL wants to read first happens if non-blocking sockets are used or if you specify a timeout for the connection. The last case should be handled transparently for the user but in the first case you have to deal with want read first (SSL_WANT_READ) and want write first (SSL_WANT_WRITE) explicitly by waiting for the socket to be readable or writable using select or similar and then re-doing the failed action (read, write, connect_SSL, accept_SSL...) again. There is a part in the documentation of IO::Socket::SSL which deals with non-blocking sockets and describes how the handling differs from non-SSL sockets and what SSL_WANT_READ and SSL_WANT_WRITE mean.
As for the error about Interrupted system call: I think the origin of this must be somewhere in the code you did not show. The strace you show indicates that there happens a SIGCHLD, so an exit of a sub-process might be the cause of this problem. As with SSL_WANT_* you need to continue with the current operation if EINTR happens but this is expected when dealing with non-SSL sockets too.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|