cURL / Mailing Lists / curl-library / Single Mail


Re: CURLOPT_NOSIGNAL set but libcurl still raises signals in HTTPS sessions

From: Daniel Stenberg <>
Date: Sat, 14 Jun 2008 23:26:28 +0200 (CEST)

On Fri, 13 Jun 2008, wrote:

> m_nErr = curl_easy_setopt(m_cSession, CURLOPT_NOSIGNAL, 1);

> Since I don't receive any error when this code is executed, I suppose
> libcurl to have properly set up my CURL session.

No, it means that you could succesfully set that option. It doesn't set up
anything in the setopt call.

> My app often needs to exchange data with an HTTPS server with which
> connection is not so good. Sometimes, probably due to server connection
> loss, my app still complains it receives a SIGPIPE, (broken pipe), signal
> end abruptly ends.

Right, this is an openssl issue and I have no idea how to address this. Not
for you, nor for libcurl. The only thing libcurl would be able to do is to
ignore the signal, which is the exact same thing you too could do. I can't
find a way to tell OpenSSL to not generate them (unless we're using a BSD
style OS since then we switch off SIGPIPE with setsockopt!).

> Sure I can prevent my app from being disturbed by such a SIGPIPE signal by
> setting up a signal handler in its main code, (for instance to "ignore" it),
> but is there another way to prevent it from generating this signal please?

I haven't found any.

Received on 2008-06-14