diff options
author | Jeff King <peff@peff.net> | 2014-05-05 12:47:46 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-05-05 12:47:46 +0200 |
commit | 37f484276d863347df2616ead1524bffc2257098 (patch) | |
tree | c2a1c5df18ac81d2daa45f432e217cd02cd27aba /lib | |
parent | 1f93471bdad95b7e103848adc29d3e947800dfb4 (diff) |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/multi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/multi.c b/lib/multi.c index 7720c957a..c52db9625 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -1806,10 +1806,13 @@ static void close_all_connections(struct Curl_multi *multi) conn = Curl_conncache_find_first_connection(multi->conn_cache); while(conn) { + SIGPIPE_VARIABLE(pipe_st); conn->data = multi->closure_handle; + sigpipe_ignore(conn->data, &pipe_st); /* This will remove the connection from the cache */ (void)Curl_disconnect(conn, FALSE); + sigpipe_restore(&pipe_st); conn = Curl_conncache_find_first_connection(multi->conn_cache); } |