diff options
Diffstat (limited to '')
-rw-r--r-- | src/libmdsserver/util.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libmdsserver/util.h b/src/libmdsserver/util.h index 4f505db..8bfaa71 100644 --- a/src/libmdsserver/util.h +++ b/src/libmdsserver/util.h @@ -37,6 +37,19 @@ char* getenv_nonempty(const char* var); */ void reexec_server(int argc, char** argv, int reexeced); +/** + * Set up a signal trap. + * This function should only be used for common mds + * signals, and this function may choose to add + * additional behaviour depending on the signal, such + * as blocking other signals. + * + * @param signo The signal to trap + * @param function The function to run when the signal is caught + * @return Zero on success, -1 on error + */ +int xsigaction(int signo, void (*function)(int signo)); + #endif |