diff options
author | Colm MacCarthaigh <colm@apache.org> | 2010-01-08 11:45:43 +0000 |
---|---|---|
committer | Colm MacCarthaigh <colm@apache.org> | 2010-01-08 11:45:43 +0000 |
commit | 396931c93e46f5d130f0df7044a9c0e63fd12ebd (patch) | |
tree | 9ff5247f604985caa9581ebe4bfa6aa5164db5ce /APACHE_1_3_42/src/os/win32/service.h | |
parent | 7d344b579813528064a6711a91f675b7f47e4926 (diff) | |
download | httpd-800595eceb63d691618214f91844d445062422e2.tar.gz |
Tag 1.3.421.3
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/tags/1.3@897175 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'APACHE_1_3_42/src/os/win32/service.h')
-rw-r--r-- | APACHE_1_3_42/src/os/win32/service.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/APACHE_1_3_42/src/os/win32/service.h b/APACHE_1_3_42/src/os/win32/service.h new file mode 100644 index 0000000000..77684e6a9a --- /dev/null +++ b/APACHE_1_3_42/src/os/win32/service.h @@ -0,0 +1,54 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SERVICE_H +#define SERVICE_H + +#ifdef WIN32 + +/* BIG RED WARNING: exit() is mapped to allow us to capture the exit + * status. This header must only be included from modules linked into + * the ApacheCore.dll - since it's a horrible behavior to exit() from + * any module outside the main() block, and we -will- assume it's a + * fatal error. No dynamically linked module will ever be able to find + * the real_exit_code, and _will_ GP fault if it tries this macro. + */ + +#define exit(status) ((exit)((real_exit_code==2) ? (real_exit_code = (status)) \ + : ((real_exit_code = 0), (status)))) +extern int real_exit_code; +void hold_console_open_on_error(void); + +int service_main(int (*main_fn)(int, char **), int argc, char **argv); +int service95_main(int (*main_fn)(int, char **), int argc, char **argv, + char *display_name); +void service_set_status(int status); +void service_cd(); +char *get_service_name(char *display_name); +char *get_display_name(char *service_name); +BOOL isProcessService(); +BOOL isValidService(char *display_name); +void InstallService(pool *p, char *display_name, int argc, char **argv, int reconfig); +void RemoveService(char *display_name); +int send_signal_to_service(char *display_name, char *sig, + int argc, char **argv); +BOOL isWindowsNT(void); +void ap_start_console_monitor(void); +void ap_start_child_console(int is_child_of_service); + +#endif /* WIN32 */ + +#endif /* SERVICE_H */ |