From 717392246a8ec7eb138802e1fd55f658b304b4c0 Mon Sep 17 00:00:00 2001 From: dan Date: Sat, 1 Sep 2001 13:30:55 +0000 Subject: [PATCH] Small cleanup of the sigpipe handling code --- src/startup.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/startup.c b/src/startup.c index 99a82092..1c7b91a2 100644 --- a/src/startup.c +++ b/src/startup.c @@ -294,6 +294,13 @@ handleExitSig(int sig) sigprocmask(SIG_UNBLOCK, &sigs, NULL); } +/* Dummy signal handler */ +static void +dummyHandler(int sig) +{ +} + + /* *---------------------------------------------------------------------- * handleSig-- @@ -715,12 +722,6 @@ static char *atomNames[] = { GNUSTEP_TITLEBAR_STATE }; -static void -handle_sigpipe(int signum) -{ - if (0) signum=0; /* To avoid a gcc warning */ - return; -} /* *---------------------------------------------------------- @@ -853,12 +854,12 @@ StartUp(Bool defaultScreenOnly) sigaction(SIGUSR2, &sig_action, NULL); /* ignore dead pipe */ - sig_action.sa_handler = &handle_sigpipe; /* Because POSIX mandates that only signal with handlers are reset - accross an exec*(), we do not want to propagate ignoring SIGPIPEs - to children. Hence the dummy handler. - Philippe Troin - */ + * accross an exec*(), we do not want to propagate ignoring SIGPIPEs + * to children. Hence the dummy handler. + * Philippe Troin + */ + sig_action.sa_handler = &dummyHandler; sig_action.sa_flags = SA_RESTART; sigaction(SIGPIPE, &sig_action, NULL);