1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 05:18:06 +01:00

Small cleanup of the sigpipe handling code

This commit is contained in:
dan
2001-09-01 13:30:55 +00:00
parent 6b75506e52
commit 717392246a

View File

@@ -294,6 +294,13 @@ handleExitSig(int sig)
sigprocmask(SIG_UNBLOCK, &sigs, NULL); sigprocmask(SIG_UNBLOCK, &sigs, NULL);
} }
/* Dummy signal handler */
static void
dummyHandler(int sig)
{
}
/* /*
*---------------------------------------------------------------------- *----------------------------------------------------------------------
* handleSig-- * handleSig--
@@ -715,12 +722,6 @@ static char *atomNames[] = {
GNUSTEP_TITLEBAR_STATE 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); sigaction(SIGUSR2, &sig_action, NULL);
/* ignore dead pipe */ /* ignore dead pipe */
sig_action.sa_handler = &handle_sigpipe;
/* Because POSIX mandates that only signal with handlers are reset /* Because POSIX mandates that only signal with handlers are reset
accross an exec*(), we do not want to propagate ignoring SIGPIPEs * accross an exec*(), we do not want to propagate ignoring SIGPIPEs
to children. Hence the dummy handler. * to children. Hence the dummy handler.
Philippe Troin <phil@fifi.org> * Philippe Troin <phil@fifi.org>
*/ */
sig_action.sa_handler = &dummyHandler;
sig_action.sa_flags = SA_RESTART; sig_action.sa_flags = SA_RESTART;
sigaction(SIGPIPE, &sig_action, NULL); sigaction(SIGPIPE, &sig_action, NULL);