On Wed, 3 Nov 2010, Philippe Le Rohellec wrote:

Actually, it might happen on all Unix platforms in situations where openssl is triggering the SIGPIPE. In those situations, MSG_NOSIGNAL doesn't protect us even on OSes where it's supported. That's an openssl bug.

Yes, I'm aware of that and I too agree that this is an OpenSSL bug or at least lack of feature. GnuTLS for example allows us to deal with it.

The reason I can't do it is because I'm just implementing a library that various applications will link with, so I'm not at liberty to mask the SIGPIPE globally

I guess I could do it to the same way it's done in transfer.c around every call to curl_easy_perform in my library but that's potentially a lot of places.

Ah right, but you could easily write your own wrapper for curl_easy_perform that does it and then it would accomplish the same thing.

Without MSG_NOSIGNAL or SO_NOSIGPIPE the masking is global whoever does it and that's really not very nice...

In any case, thanks for your answer. If you ever decide to split the CURLOPT_NOSIGNAL option, let me know, I would find it very useful.

You can rest assured that *I* will probably never do that on my own. I use operating systems without that flaw! Also, the fact that you can so easily work around this make me consider this not very important.

I do want it better documented though, and I'd love a helping hand with that.

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to