From: Andre Noll Date: Sun, 1 Jun 2008 16:43:39 +0000 (+0200) Subject: Also catch SIGPIPE. X-Git-Tag: v0.0.2~11 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=2bf3762aeed22e4463810bc06a0dd7bf4e031190;p=adu.git Also catch SIGPIPE. Otherwise, "adu -S | invalid_command" kills the adu process and we're left with dirty osl tables. --- diff --git a/adu.c b/adu.c index 821ce26..3fca7a0 100644 --- a/adu.c +++ b/adu.c @@ -372,6 +372,8 @@ static int init_signals(void) return -E_SIGNAL_SIG_ERR; if (signal(SIGTERM, &signal_handler) == SIG_ERR) return -E_SIGNAL_SIG_ERR; + if (signal(SIGPIPE, &signal_handler) == SIG_ERR) + return -E_SIGNAL_SIG_ERR; return 1; }