2 * Lightweight Autonomic Network Architecture
3 * Copyright 2011 Daniel Borkmann <dborkma@tik.ee.ethz.ch>,
4 * Swiss federal institute of technology (ETH Zurich)
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 static inline void register_signal_f(int signal
, void (*handler
)(int),
33 struct sigaction saction
;
37 sigfillset(&block_mask
);
38 saction
.sa_handler
= handler
;
39 saction
.sa_mask
= block_mask
;
40 saction
.sa_flags
= flags
;
42 sigaction(signal
, &saction
, NULL
);
45 #endif /* SIGNALS_H */