title: Is it possible to force OpenSSL to not generate SIGPIPE without global signal handler change?
body: <p>I write static library that that refers to static OpenSSL library. OpenSSL generates <code>SIGPIPE</code> sometimes and crashes program. I know that it is possible to use <code>signal</code> function to disable <code>SIGPIPE</code> globally. However, for static library such requirement is not elegant (unlike shared library where you can call <code>signal</code> in initialization function). Also the method that doesn't need global changes in program is much better, because who knows may be any other library requires <code>SIGPIPE</code> and will conflict with library that requires to ignore this signal. I think good practice is to change <code>BIO</code> only and nothing else.
  OpenSSL uses sockets, and sockets <code>send</code> function contains good solution (<code>MSG_NOSIGNAL</code> flag). Is there any similar solution for OpenSSL? Is there any way to setup OpenSSL BIO in such a way that it will not generate <code>SIGPIPE</code> and not crash entire program?</p>