diff options
author | Dmitry Podgorny <pasis.ua@gmail.com> | 2012-11-12 23:15:37 +0200 |
---|---|---|
committer | Dmitry Podgorny <pasis.ua@gmail.com> | 2012-11-12 23:15:37 +0200 |
commit | e81dc3b5098c2f46e73eb1ee12ebe264e5e6d801 (patch) | |
tree | 6095bddd6e42ccf2d4aeb2e9da9f4734354b1c9c | |
parent | c67b1d6f4080e22bf121fbdf17dda66acc193f90 (diff) | |
download | profani-tty-e81dc3b5098c2f46e73eb1ee12ebe264e5e6d801.tar.gz |
ignore SIGPIPE
Applications running OpenSSL over network connections may crash if SIGPIPE is not ignored. [http://svn.apache.org/repos/asf/thrift/trunk/lib/cpp/README.SSL]
-rw-r--r-- | src/profanity.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/profanity.c b/src/profanity.c index 6b59f18c..2ce0840e 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -24,6 +24,7 @@ #include <stdlib.h> #include <string.h> +#include <signal.h> #include <glib.h> @@ -364,6 +365,8 @@ _process_input(char *inp) static void _init(const int disable_tls, char *log_level) { + // ignore SIGPIPE + signal(SIGPIPE, SIG_IGN); _create_config_directory(); log_level_t prof_log_level = _get_log_level(log_level); log_init(prof_log_level); |