From: Martin Mares Date: Thu, 9 Feb 2012 22:24:07 +0000 (+0100) Subject: Separated out sighandler module X-Git-Tag: v5.0~85 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=4dd2025ca49aad3aee2e5b1cfd4f0a59dd4ed649;p=libucw.git 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. --- 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 */