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
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
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
00056 typedef void apr_sigfunc_t(
int);
00057
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
00079 APR_DECLARE(const
char *) apr_signal_description_get(
int signum);
00080
00082 APR_DECLARE(const
char *) apr_signal_get_description(
int signum);
00083
00089
void apr_signal_init(apr_pool_t *pglobal);
00090
00093 #ifdef __cplusplus
00094 }
00095 #endif
00096
00097 #endif