signal.c (61b63c556c0877ee6d3832ee641bc427ff4d94d6) signal.c (c9a3072d13e4b8a6549ecc1db6390a55c7ee2ddf)
1/*
2 * Copyright (C) 2004 PathScale, Inc
3 * Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
4 * Licensed under the GPL
5 */
6
7#include <stdlib.h>
8#include <stdarg.h>

--- 169 unchanged lines hidden (view full) ---

178}
179
180int change_sig(int signal, int on)
181{
182 sigset_t sigset, old;
183
184 sigemptyset(&sigset);
185 sigaddset(&sigset, signal);
1/*
2 * Copyright (C) 2004 PathScale, Inc
3 * Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
4 * Licensed under the GPL
5 */
6
7#include <stdlib.h>
8#include <stdarg.h>

--- 169 unchanged lines hidden (view full) ---

178}
179
180int change_sig(int signal, int on)
181{
182 sigset_t sigset, old;
183
184 sigemptyset(&sigset);
185 sigaddset(&sigset, signal);
186 sigprocmask(on ? SIG_UNBLOCK : SIG_BLOCK, &sigset, &old);
186 if (sigprocmask(on ? SIG_UNBLOCK : SIG_BLOCK, &sigset, &old) < 0)
187 return -errno;
187 return !sigismember(&old, signal);
188}
189
190void block_signals(void)
191{
192 signals_enabled = 0;
193 /*
194 * This must return with signals disabled, so this barrier

--- 87 unchanged lines hidden ---
188 return !sigismember(&old, signal);
189}
190
191void block_signals(void)
192{
193 signals_enabled = 0;
194 /*
195 * This must return with signals disabled, so this barrier

--- 87 unchanged lines hidden ---