This also includes SIGALRM. Thus just ignoring EINTR and continuing would break timeout handling using an ALARM handler.

In theory yes, but in practice it is not usually done that way, instead, the common approach is to call die from the signal handler.

But in my opinion there is an explicit SIGCHLD handler in the code not shown so the application explicitly asks for signals and therefore has to properly deal with these

So, when writing code using IO::Socket::SSL you have to take into account how other parts of your program, maybe unrelated, work? In the end, what you are saying is that for anything but small scripts the module user has to handle EINTR errors explicitly always.

IMO, this puts unnecessary burden on the module user just for the rare case when he would need to handle EINTR himself. That goes against the Perl principle saying that "Easy things should be easy, and hard things should be possible". So my conclusion is that at least the new method should take care of handling EINTR itself, in the same way it already does for readline for instance. For the case where the user wants to handle EINTR himself, he can revert to using lower level methods.


In reply to Re^7: IO::Socket::SSL sometimes says 'SSL wants a read first' by salva
in thread IO::Socket::SSL sometimes says 'SSL wants a read first' by FloydATC

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.