curl-users
Re: broken pipe
Date: Sat, 2 Aug 2008 22:46:58 +0200 (CEST)
On Thu, 31 Jul 2008, brubelsabs wrote:
> I've coded a small program checking some URLs
Then I recommend you to use the curl-library mailing list instead of this.
> #1 0xb7ca62f3 in write () from /lib/tls/i686/cmov/libc.so.6
> #2 0xb799cdd1 in ?? () from /usr/lib/i686/cmov/libcrypto.so.0.9.8
> #3 0xb799ac73 in BIO_write () from /usr/lib/i686/cmov/libcrypto.so.0.9.8
> #4 0xb7a5eabe in ssl3_write_pending () from
> /usr/lib/i686/cmov/libssl.so.0.9.8
This happens within OpenSSL code. What if you use HTTP only? Is your program
multi-threaded perhaps without the OpenSSL mutex callbacks set?
> Program terminated with signal SIGPIPE, Broken pipe.
> while(CURLM_CALL_MULTI_PERFORM == curl_multi_perform(_handle,
> &handles));
>
> I've read: http://curl.haxx.se/mail/lib-2006-01/0170.html that this isn't an
> issue with libcurl but with libssl, and I should implement a signal handler
> ignoring the SIGPIPE, but this was some time ago and maybe there is now a
> proper solution? I use libcurl together with libares.
Ah right. If you make OpenSSL send data and the server dies/closes the
connection, libcurl won't (be able to) ignore the SIGPIPE and this will
happen. I don't think we have a good way to fix this, and I'd actually even go
so far to suggest that it is strange that OpenSSL offers no way for us to
avoid them.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2008-08-02