On Fri, 31 May 2013, Indtiny s wrote:
I am running a one application which starts the timer thread for some
internal purpose .
when I ever that timer expires I do some actions and send the results to
server so I use curl to post the result to the server with https (using
openssl ) .
When Iever curl perform the easy_perform , I receive the SIgnal *Program
received signal SIGPIPE, Broken pipe*. in the gdb .
Though I set the option *curl_easy_setopt(session, CURLOPT_NOSIGNAL, 1L);*
I am getting the same issue , is it a problem at curl or my application .?
The reason for the problem is that CURLOPT_NOSIGNAL, 1L makes libcur not
attempt to do anything with signals, and OpenSSL can in some cases attempt to
write() to closed connections and thus generate a SIGPIPE.
First step toward a fix: please try out and give me your comments on my
suggested patch for this issue that I've posted previously here:
https://sourceforge.net/p/curl/bugs/1180/
The patch isn't (yet) covering all the cases but I'm considering to proceed
nevertheless. I also consider doing the sigaction-magic conditional to only
get done if libcurl is built with libraries for which it makes sense. Such as
OpenSSL...
As a work-around until we have that fix merged into libcurl, you can do that
sigpipe-ignoring yourself in your app.
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html