00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef APR_SIGNAL_H
00017 #define APR_SIGNAL_H
00018
00019
00020
00021
00022
00023
00024 #include "apr.h"
00025 #include "apr_pools.h"
00026
00027 #if APR_HAVE_SIGNAL_H
00028 #include <signal.h>
00029 #endif
00030
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034
00035
00036
00037
00038
00039
00040
00041 #if APR_HAVE_SIGACTION || defined(DOXYGEN)
00042
00043 #if defined(DARWIN) && !defined(__cplusplus) && !defined(_ANSI_SOURCE)
00044
00045
00046
00047 #undef SIG_DFL
00048 #undef SIG_IGN
00049 #undef SIG_ERR
00050 #define SIG_DFL (void (*)(int))0
00051 #define SIG_IGN (void (*)(int))1
00052 #define SIG_ERR (void (*)(int))-1
00053 #endif
00054
00055
00056 typedef void apr_sigfunc_t(int);
00057
00058
00059
00060
00061
00062
00063 APR_DECLARE(apr_sigfunc_t *) apr_signal(int signo, apr_sigfunc_t * func);
00064
00065 #if defined(SIG_IGN) && !defined(SIG_ERR)
00066 #define SIG_ERR ((apr_sigfunc_t *) -1)
00067 #endif
00068
00069 #else
00070 #define apr_signal(a, b) signal(a, b)
00071 #endif
00072
00073
00074
00075
00076
00077
00078
00079 APR_DECLARE(const char *) apr_signal_description_get(int signum);
00080
00081
00082
00083
00084
00085
00086 void apr_signal_init(apr_pool_t *pglobal);
00087
00088
00089
00090
00091
00092
00093 APR_DECLARE(apr_status_t) apr_signal_block(int signum);
00094
00095
00096
00097
00098
00099
00100 APR_DECLARE(apr_status_t) apr_signal_unblock(int signum);
00101
00102
00103
00104 #ifdef __cplusplus
00105 }
00106 #endif
00107
00108 #endif