diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2015-07-24 00:50:58 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2015-07-24 00:59:27 -0700 |
commit | b4f53143b0e05fd3061cdf2e65e17a6a2904090b (patch) | |
tree | 4785bf31f7b89fc2420aa740d9a6967dc6c6f9b1 /src/signal.h | |
parent | 9c2fdc6da57032c4448b59de5872086eea626b74 (diff) |
Migrate source files into src/ directory
This change moves source files into a src/ directory,
and puts object files into an obj/ directory. The Makefile
and xcode project are updated accordingly.
Fixes #1866
Diffstat (limited to 'src/signal.h')
-rw-r--r-- | src/signal.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/signal.h b/src/signal.h new file mode 100644 index 00000000..fc3e7e73 --- /dev/null +++ b/src/signal.h @@ -0,0 +1,65 @@ +/** \file signal.h + +The library for various signal related issues + +*/ +#ifndef FISH_SIGNALH +#define FISH_SIGNALH + +#include <signal.h> + +/** + Get the integer signal value representing the specified signal, or + -1 of no signal was found +*/ +int wcs2sig(const wchar_t *str); + +/** + Get string representation of a signal +*/ +const wchar_t *sig2wcs(int sig); + +/** + Returns a description of the specified signal. +*/ +const wchar_t *signal_get_desc(int sig); + +/** + Set all signal handlers to SIG_DFL +*/ +void signal_reset_handlers(); + +/** + Set signal handlers to fish default handlers +*/ +void signal_set_handlers(); + +/** + Tell fish what to do on the specified signal. + + \param sig The signal to specify the action of + \param do_handle If true fish will catch the specified signal and fire an event, otherwise the default action (SIG_DFL) will be set +*/ +void signal_handle(int sig, int do_handle); + +/** + Block all signals +*/ +void signal_block(); + +/** + Unblock all signals +*/ +void signal_unblock(); + +/** + Returns true if signals are being blocked +*/ +bool signal_is_blocked(); + +/** + Returns signals with non-default handlers +*/ +void get_signals_with_handlers(sigset_t *set); + +#endif |