From 4dd2025ca49aad3aee2e5b1cfd4f0a59dd4ed649 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 9 Feb 2012 23:24:07 +0100 Subject: [PATCH] Separated out sighandler module For years, it was used only in lizard-safe and its use makes signal handling even more complicated than it's usual. Scheduled for removal, will replace it by a lizard-specific hack. --- ucw/sighandler.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ucw/sighandler.h diff --git a/ucw/sighandler.h b/ucw/sighandler.h new file mode 100644 index 00000000..9c941665 --- /dev/null +++ b/ucw/sighandler.h @@ -0,0 +1,19 @@ +/* + * UCW Library -- Signal Handling + * + * (c) 2012 Martin Mares + * + * This software may be freely distributed and used according to the terms + * of the GNU Lesser General Public License. + */ + +#ifndef _UCW_SIGHANDLER_H +#define _UCW_SIGHANDLER_H + +typedef int (*ucw_sighandler_t)(int); // gets signum, returns nonzero if abort() should be called + +void handle_signal(int signum); +void unhandle_signal(int signum); +ucw_sighandler_t set_signal_handler(int signum, ucw_sighandler_t newh); + +#endif /* !_UCW_SIGHANDLER_H */ -- 2.39.2