[Help-gnutls] avoiding signals completely
Rupert Kittinger-Sereinig
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
>> sigaction()?
>
> 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.
cheers,
Rupert
--
Rupert Kittinger-Sereinig <rks at mur.at>
Krenngasse 32
A-8010 Graz
Austria
More information about the Gnutls-help
mailing list