[Help-gnutls] avoiding signals completely
rks at mur.at
Tue Oct 31 09:47:51 CET 2006
Daniel Stenberg schrieb:
> On Tue, 31 Oct 2006, Rupert Kittinger-Sereinig wrote:
>>> 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.
>> Why not simply disable SIGPIPE for the whole application with
> Yes, that's one way to do it for an application. But that's not a
> solution for a library and I want the library (libcurl) to work as
> documented without having to force the application to do various tricks.
> sigaction() is not even present everywhere.
well, signal(SIGPIPE, SIG_IGN) should be enough for everyone :-)
generally, I think raising SIGPIPE with the default action to terminate
the app was a terrible design decision, but a library like gnutls that
simply takes a file descriptor should use the socket "as-is", and leave
the rest to the client of the library.
Rupert Kittinger-Sereinig <rks at mur.at>
More information about the Gnutls-help