Apache HTTPD
apr_signal.h
Go to the documentation of this file.
1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef APR_SIGNAL_H
18#define APR_SIGNAL_H
19
25#include "apr.h"
26#include "apr_pools.h"
27
28#if APR_HAVE_SIGNAL_H
29#include <signal.h>
30#endif
31
32#ifdef __cplusplus
33extern "C" {
34#endif /* __cplusplus */
35
42#if APR_HAVE_SIGACTION || defined(DOXYGEN)
43
44#if defined(DARWIN) && !defined(__cplusplus) && !defined(_ANSI_SOURCE)
45/* work around Darwin header file bugs
46 * http://www.opensource.apple.com/bugs/X/BSD%20Kernel/2657228.html
47 */
48#undef SIG_DFL
49#undef SIG_IGN
50#undef SIG_ERR
51#define SIG_DFL (void (*)(int))0
52#define SIG_IGN (void (*)(int))1
53#define SIG_ERR (void (*)(int))-1
54#endif
55
57typedef void apr_sigfunc_t(int);
58
65
66#if defined(SIG_IGN) && !defined(SIG_ERR)
67#define SIG_ERR ((apr_sigfunc_t *) -1)
68#endif
69
70#else /* !APR_HAVE_SIGACTION */
71#define apr_signal(a, b) signal(a, b)
72#endif
73
74
81
88
95
102
105#ifdef __cplusplus
106}
107#endif /* __cplusplus */
108
109#endif /* APR_SIGNAL_H */
APR memory allocation.
const void apr_status_t(*) apr_status_t(* APR_DECLARE)(void) apr_pool_pre_cleanup_register(apr_pool_t *p
Definition apr_pools.h:646
apr_size_t size
int apr_status_t
Definition apr_errno.h:44
apr_interval_time_t apr_pollcb_cb_t func
Definition apr_poll.h:422
void apr_signal_init(apr_pool_t *pglobal)
Definition signals.c:34
#define apr_signal(a, b)
Definition apr_signal.h:71
const char * apr_signal_description_get(int signum)
Definition signals.c:38