Skip to content
Snippets Groups Projects
Commit 37f48427 authored by Jeff King's avatar Jeff King Committed by Daniel Stenberg
Browse files

curl_multi_cleanup: ignore SIGPIPE better

When looping and closing each individual connection left open, the
SIGPIPE ignoring was not done and could thus lead to death by signal 13.

Bug: http://thread.gmane.org/gmane.comp.version-control.git/238242
parent 1f93471b
No related branches found
No related tags found
No related merge requests found
...@@ -1806,10 +1806,13 @@ static void close_all_connections(struct Curl_multi *multi) ...@@ -1806,10 +1806,13 @@ static void close_all_connections(struct Curl_multi *multi)
conn = Curl_conncache_find_first_connection(multi->conn_cache); conn = Curl_conncache_find_first_connection(multi->conn_cache);
while(conn) { while(conn) {
SIGPIPE_VARIABLE(pipe_st);
conn->data = multi->closure_handle; conn->data = multi->closure_handle;
sigpipe_ignore(conn->data, &pipe_st);
/* This will remove the connection from the cache */ /* This will remove the connection from the cache */
(void)Curl_disconnect(conn, FALSE); (void)Curl_disconnect(conn, FALSE);
sigpipe_restore(&pipe_st);
conn = Curl_conncache_find_first_connection(multi->conn_cache); conn = Curl_conncache_find_first_connection(multi->conn_cache);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment