3 * By Daniel Borkmann <daniel@netyack.org>
4 * Copyright 2009, 2010 Daniel Borkmann.
5 * Subject to the GPL, version 2.
14 static inline void register_signal(int signal
, void (*handler
)(int))
17 struct sigaction saction
;
21 sigfillset(&block_mask
);
22 saction
.sa_handler
= handler
;
23 saction
.sa_mask
= block_mask
;
24 saction
.sa_flags
= SA_RESTART
;
26 sigaction(signal
, &saction
, NULL
);
29 #endif /* SIGNALS_H */