]> granicus.if.org Git - apache/blob - server/mpm/winnt/mpm_winnt.h
This is rather irritating.
[apache] / server / mpm / winnt / mpm_winnt.h
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 /**
18  * @file  mpm_winnt.h
19  * @brief WinNT MPM specific 
20  *
21  * @addtogroup APACHE_MPM_WINNT
22  * @{
23  */
24
25 #ifndef APACHE_MPM_WINNT_H
26 #define APACHE_MPM_WINNT_H
27
28 #include "apr_proc_mutex.h"
29 #include "ap_listen.h"
30
31 /* From service.c: */
32
33 #define SERVICE_APACHE_RESTART 128
34
35 #ifndef AP_DEFAULT_SERVICE_NAME
36 #define AP_DEFAULT_SERVICE_NAME "Apache2.x"
37 #endif
38
39 #define SERVICECONFIG "System\\CurrentControlSet\\Services\\%s"
40 #define SERVICEPARAMS "System\\CurrentControlSet\\Services\\%s\\Parameters"
41
42 apr_status_t mpm_service_set_name(apr_pool_t *p, const char **display_name, 
43                                                  const char *set_name);
44 apr_status_t mpm_merge_service_args(apr_pool_t *p, apr_array_header_t *args, 
45                                    int fixed_args);
46
47 apr_status_t mpm_service_to_start(const char **display_name, apr_pool_t *p);
48 apr_status_t mpm_service_started(void);
49 apr_status_t mpm_service_install(apr_pool_t *ptemp, int argc, 
50                                 char const* const* argv, int reconfig);
51 apr_status_t mpm_service_uninstall(void);
52
53 apr_status_t mpm_service_start(apr_pool_t *ptemp, int argc, 
54                               char const* const* argv);
55
56 void mpm_signal_service(apr_pool_t *ptemp, int signal);
57
58 void mpm_service_stopping(void);
59
60 void mpm_start_console_handler(void);
61 void mpm_start_child_console_handler(void);
62
63 /* From nt_eventlog.c: */
64
65 void mpm_nt_eventlog_stderr_open(const char *display_name, apr_pool_t *p);
66 void mpm_nt_eventlog_stderr_flush(void);
67
68 /* From mpm_winnt.c: */
69
70 extern int ap_threads_per_child;
71
72 extern DWORD my_pid;
73 extern apr_proc_mutex_t *start_mutex;
74 extern HANDLE exit_event;
75
76 extern int winnt_mpm_state;
77 extern OSVERSIONINFO osver;
78 extern DWORD stack_res_flag;
79
80 extern void clean_child_exit(int);
81
82 void setup_signal_names(char *prefix);
83
84 typedef enum {
85     SIGNAL_PARENT_SHUTDOWN,
86     SIGNAL_PARENT_RESTART,
87     SIGNAL_PARENT_RESTART_GRACEFUL
88 } ap_signal_parent_e;
89 AP_DECLARE(void) ap_signal_parent(ap_signal_parent_e type);
90
91 void hold_console_open_on_error(void);
92
93 /* From child.c: */
94 void child_main(apr_pool_t *pconf);
95
96 #endif /* APACHE_MPM_WINNT_H */
97 /** @} */