From 6eeeee1778253dcd3a7783275377434238f855fe Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 31 Oct 2007 15:39:55 +0000 Subject: Ignore SIGPIPE on all platforms, not just RISC OS. svn path=/trunk/netsurf/; revision=3638 --- desktop/netsurf.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'desktop') diff --git a/desktop/netsurf.c b/desktop/netsurf.c index eec131ad7..d90683be8 100644 --- a/desktop/netsurf.c +++ b/desktop/netsurf.c @@ -19,6 +19,7 @@ */ #include +#include #include #include #include @@ -76,6 +77,14 @@ void netsurf_init(int argc, char** argv) { struct utsname utsname; + /* 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 !(defined(__SVR4) && defined(__sun)) stdout = stderr; #endif -- cgit v1.2.3