summaryrefslogtreecommitdiff
path: root/methods/http_main.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-07-14 11:22:41 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-07-14 11:22:41 +0200
commit217d575b5713f4d9275177b58a36c581a7880c03 (patch)
treea935fec12d3add2ba34c40d8bae17211afe158e6 /methods/http_main.cc
parent38f5cfd8381dbdc761ba4758fb9c22c2e95498d6 (diff)
* apt-pkg/acquire-worker.cc:
- show error details of failed methods * apt-pkg/contrib/fileutl.cc: - if a process aborts with signal, show signal number * methods/http.cc: - ignore SIGPIPE, we deal with EPIPE from write in HttpMethod::ServerDie() (LP: #385144)
Diffstat (limited to 'methods/http_main.cc')
-rw-r--r--methods/http_main.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/methods/http_main.cc b/methods/http_main.cc
index 2c46ab19d..7815c2fc1 100644
--- a/methods/http_main.cc
+++ b/methods/http_main.cc
@@ -1,5 +1,6 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/acquire-method.h>
+#include <signal.h>
#include "connect.h"
#include "rfc2553emu.h"
@@ -10,6 +11,10 @@ int main()
{
setlocale(LC_ALL, "");
+ // ignore SIGPIPE, this can happen on write() if the socket
+ // closes the connection (this is dealt with via ServerDie())
+ signal(SIGPIPE, SIG_IGN);
+
HttpMethod Mth;
return Mth.Loop();
}