From 35a22ac3079f046d4443a1e56f7e9729f0aa5590 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Sun, 12 Feb 2012 22:27:51 -0800 Subject: [PATCH] common: added signal for usr1 --- common/os_calls.c | 11 +++++++++++ common/os_calls.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/common/os_calls.c b/common/os_calls.c index bbec959f..d98d4027 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -1917,6 +1917,17 @@ g_signal_pipe(void (*func)(int)) #endif } +/*****************************************************************************/ +/* does not work in win32 */ +void APP_CC +g_signal_usr1(void (*func)(int)) +{ +#if defined(_WIN32) +#else + signal(SIGUSR1, func); +#endif +} + /*****************************************************************************/ /* does not work in win32 */ int APP_CC diff --git a/common/os_calls.h b/common/os_calls.h index e5625d16..94b857df 100644 --- a/common/os_calls.h +++ b/common/os_calls.h @@ -218,6 +218,8 @@ void APP_CC g_signal_terminate(void (*func)(int)); void APP_CC g_signal_pipe(void (*func)(int)); +void APP_CC +g_signal_usr1(void (*func)(int)); int APP_CC g_fork(void); int APP_CC