diff options
author | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 2001-04-12 18:46:32 +0000 |
---|---|---|
committer | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 2001-04-12 18:46:32 +0000 |
commit | 030b26a8b7e40d0d8fde0e95e83be9dcdcf56a83 (patch) | |
tree | 92e4d67b249a97e9df19c6eae75bfc7adcd37d56 /include | |
parent | ad9f55780e69b62144f599bd0f5e861063c22458 (diff) | |
download | libapr-030b26a8b7e40d0d8fde0e95e83be9dcdcf56a83.tar.gz |
Convert the apr_create_signal_thread to apr_signal_thread. The main
difference, is that instead of creating a separate thread to listen for
signals, the thread that calls this function does the listening. Many
platforms have issues when the main thread isn't the thread that is
listening for signals. Even more platforms complain when the main thread
dies, but the process doesn't. This gets the main thread back to being
the signal handling thread.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61518 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/apr_thread_proc.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/include/apr_thread_proc.h b/include/apr_thread_proc.h index b86c14aa1..fc9f60e9b 100644 --- a/include/apr_thread_proc.h +++ b/include/apr_thread_proc.h @@ -598,19 +598,13 @@ APR_DECLARE(void) apr_pool_note_subprocess(apr_pool_t *a, apr_proc_t *pid, APR_DECLARE(apr_status_t) apr_setup_signal_thread(void); /** - * Create a thread that will listen for signals. The thread will loop + * Make the current thread listen for signals. This thread will loop * forever, calling a provided function whenever it receives a signal. That * functions should return 1 if the signal has been handled, 0 otherwise. - * @param td The newly created thread - * @param tattr The threadattr to use when creating the thread * @param signal_handler The function to call when a signal is received - * @param p The pool to use when creating the thread - * @deffunc apr_status_t apr_create_signal_thread(apr_thread_t **td, apr_threadattr_t *tattr, int (*signal_handler)(int signum), apr_pool_t *p) + * apr_status_t apr_signal_thread((int)(*signal_handler)(int signum)) */ -APR_DECLARE(apr_status_t) apr_create_signal_thread(apr_thread_t **td, - apr_threadattr_t *tattr, - int (*signal_handler)(int signum), - apr_pool_t *p); +APR_DECLARE(apr_status_t) apr_signal_thread(int(*signal_handler)(int signum)); #endif /* APR_HAS_THREADS */ #ifdef __cplusplus |