[Help-gnutls] avoiding signals completely

Daniel Stenberg daniel at haxx.se
Tue Oct 31 09:03:39 CET 2006


Hi gnutls hackers!

I want to be able to use GnuTLS without ever having to bother with signals!

We're using GnuTLS within libcurl and lots of people use it multi-threaded and 
then signals don't work properly and make no sense. Within libcurl itself we 
then make an effort to avoid them all over, but now we've fallen over a 
problem when GnuTLS sends (or rather is the cause of) a SIGPIPE.

I've checked the _gnutls_io_write_buffered() function in both 1.4.4 and 1.5.3 
and there doesn't seem to be any means to disable the signal-generation.

May I suggest that we at least add an option that avoids signals when using 
GnuTLS? It would be a matter of using the fourth send() argument on most 
platforms, and the SO_NOSIGPIPE socket option on some. We already do this 
magic in libcurl.

I would be willing to provide a patch if there's no major objections.

Here's the full backtrace from Brendan Jurd who faced this problem:

 	http://curl.haxx.se/mail/lib-2006-10/0321.html





More information about the Gnutls-help mailing list