mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-03 09:44:24 +03:00
Ignore SIGPIPE on all platforms, not just RISC OS.
svn path=/trunk/netsurf/; revision=3638
This commit is contained in:
parent
d1bf94dc4d
commit
6eeeee1778
@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include <locale.h>
|
||||
#include <signal.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -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
|
||||
|
@ -383,13 +383,6 @@ 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 ||
|
||||
|
Loading…
Reference in New Issue
Block a user