Revert hack around broken pipe (not caching fetch handles used for SSL

connections).
Ignore SIGPIPE completely as nothing other than OpenSSL is expected to 
generate it.

svn path=/trunk/netsurf/; revision=3145
This commit is contained in:
John Mark Bell 2007-01-18 01:26:58 +00:00
parent 75526f77b7
commit f629a4f00f
2 changed files with 9 additions and 6 deletions

View File

@ -755,12 +755,8 @@ void fetch_stop(struct fetch *f)
codem = curl_multi_remove_handle(fetch_curl_multi,
f->curl_handle);
assert(codem == CURLM_OK);
if (strncasecmp(f->url, "https:", 6)) {
/* Put this curl handle into the cache if wanted. */
fetch_cache_handle(f->curl_handle, f->host);
} else {
curl_easy_cleanup(f->curl_handle);
}
/* Put this curl handle into the cache if wanted. */
fetch_cache_handle(f->curl_handle, f->host);
f->curl_handle = 0;
/* Remove this from the active set of fetches (if it's still there) */
RING_REMOVE(fetch_ring, f);

View File

@ -372,6 +372,13 @@ void gui_init(int argc, char** argv)
prev_sigs.sigint = signal(SIGINT, ro_gui_signal);
prev_sigs.sigsegv = signal(SIGSEGV, ro_gui_signal);
prev_sigs.sigterm = signal(SIGTERM, ro_gui_signal);
/* Ignore SIGPIPE - this is necessary as OpenSSL can generate these
* and the default action is to terminate the app. There's no easy
* way of determining the cause of the SIGPIPE (other than using
* sigaction() and some mechanism for getting the file descriptor
* out of libcurl). However, we expect nothing else to generate a
* SIGPIPE, anyway, so may as well just ignore them all. */
signal(SIGPIPE, SIG_IGN);
if (prev_sigs.sigabrt == SIG_ERR || prev_sigs.sigfpe == SIG_ERR ||
prev_sigs.sigill == SIG_ERR ||