00001 /* Licensed to the Apache Software Foundation (ASF) under one or more 00002 * contributor license agreements. See the NOTICE file distributed with 00003 * this work for additional information regarding copyright ownership. 00004 * The ASF licenses this file to You under the Apache License, Version 2.0 00005 * (the "License"); you may not use this file except in compliance with 00006 * the License. You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00025 #include "apr.h" 00026 #include "apr_strings.h" 00027 #define APR_WANT_STRFUNC 00028 #include "apr_want.h" 00029 00030 #include "httpd.h" 00031 #include "http_config.h" 00032 #include "http_log.h" 00033 #include "http_main.h" 00034 #include "mpm.h" 00035 #include "mpm_common.h" 00036 #include "ap_mpm.h" 00037 #include "ap_listen.h" 00038 #include "mpm_default.h" 00039 00040 #define RESTART_CHAR '$' 00041 #define GRACEFUL_CHAR '!' 00042 00043 #define AP_RESTART 0 00044 #define AP_GRACEFUL 1 00045 00046 typedef struct ap_pod_t ap_pod_t; 00047 00048 struct ap_pod_t { 00049 apr_file_t *pod_in; 00050 apr_file_t *pod_out; 00051 apr_pool_t *p; 00052 }; 00053 00054 AP_DECLARE(apr_status_t) ap_mpm_pod_open(apr_pool_t *p, ap_pod_t **pod); 00055 AP_DECLARE(int) ap_mpm_pod_check(ap_pod_t *pod); 00056 AP_DECLARE(apr_status_t) ap_mpm_pod_close(ap_pod_t *pod); 00057 AP_DECLARE(apr_status_t) ap_mpm_pod_signal(ap_pod_t *pod, int graceful); 00058 AP_DECLARE(void) ap_mpm_pod_killpg(ap_pod_t *pod, int num, int graceful);