Apache HTTPD
start.c
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#include "apr.h"
18#include "apr_general.h"
19#include "apr_pools.h"
20#include "apr_signal.h"
21#include "apr_atomic.h"
22
23#include "apr_arch_proc_mutex.h" /* for apr_proc_mutex_unix_setup_lock() */
24#include "apr_arch_internal_time.h"
25
26
28 const char * const * *argv,
29 const char * const * *env)
30{
31 /* An absolute noop. At present, only Win32 requires this stub, but it's
32 * required in order to move command arguments passed through the service
33 * control manager into the process, and it's required to fix the char*
34 * data passed in from win32 unicode into utf-8, win32's apr internal fmt.
35 */
36 return apr_initialize();
37}
38
39static int initialized = 0;
40
42{
45
46 if (initialized++) {
47 return APR_SUCCESS;
48 }
49
50#if !defined(BEOS) && !defined(OS2)
53#endif
54
56 return status;
57
59 return APR_ENOPOOL;
60 }
61
62 apr_pool_tag(pool, "apr_initialize");
63
64 /* apr_atomic_init() used to be called from here aswell.
65 * Pools rely on mutexes though, which can be backed by
66 * atomics. Due to this circular dependency
67 * apr_pool_initialize() is taking care of calling
68 * apr_atomic_init() at the correct time.
69 */
70
72
73 return APR_SUCCESS;
74}
75
77{
79 if (initialized) {
80 return;
81 }
83
84}
85
87{
89}
APR Atomic Operations.
APR Miscellaneous library routines.
APR memory allocation.
APR Signal Handling.
#define APR_ENOPOOL
Definition apr_errno.h:290
apr_size_t size
const char int apr_pool_t * pool
Definition apr_cstr.h:84
#define APR_SUCCESS
Definition apr_errno.h:225
int apr_status_t
Definition apr_errno.h:44
apr_pool_t int argc
Definition apr_getopt.h:104
char const *const char const *const ** env
APR_DECLARE(void)
Definition start.c:200
APR_DECLARE_NONSTD(void)
Definition start.c:173
#define apr_pool_create(newpool, parent)
Definition apr_pools.h:322
void apr_signal_init(apr_pool_t *pglobal)
Definition signals.c:34
int int status
const char * argv[3]
return NULL
Definition mod_so.c:359
void apr_unix_setup_time(void)
void apr_proc_mutex_unix_setup_lock(void)
static int initialized
Definition start.c:39