Main Page | Modules | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages | Examples

beosd.h

Go to the documentation of this file.
00001 /* Copyright 1999-2005 The Apache Software Foundation or its licensors, as
00002  * applicable.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * 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 
00017 #ifndef BEOSD_H
00018 #define BEOSD_H
00019 
00020 #include "httpd.h"
00021 #include "ap_listen.h"
00022 /* common stuff that beos MPMs will want */
00023 
00024 /* Default user name and group name. These may be specified as numbers by
00025  * placing a # before a number */
00026 
00027 #ifndef DEFAULT_USER
00028 #define DEFAULT_USER "#-1"
00029 #endif
00030 #ifndef DEFAULT_GROUP
00031 #define DEFAULT_GROUP "#"
00032 #endif
00033 
00034 typedef struct {
00035     char *user_name;
00036     uid_t user_id;
00037     gid_t group_id;
00038 } beosd_config_rec;
00039 extern beosd_config_rec beosd_config;
00040 
00041 void beosd_detach(void);
00042 int beosd_setup_child(void);
00043 void beosd_pre_config(void);
00044 AP_DECLARE(const char *) beosd_set_user (cmd_parms *cmd, void *dummy, 
00045                                          const char *arg);
00046 AP_DECLARE(const char *) beosd_set_group(cmd_parms *cmd, void *dummy, 
00047                                          const char *arg);
00048 AP_DECLARE(apr_status_t) beosd_accept(void **accepted, ap_listen_rec *lr,
00049                                       apr_pool_t *ptrans);
00050 
00051 #define beosd_killpg(x, y)      (kill (-(x), (y)))
00052 #define ap_os_killpg(x, y)      (kill (-(x), (y)))
00053 
00054 #define BEOS_DAEMON_COMMANDS    \
00055 AP_INIT_TAKE1("User", beosd_set_user, NULL, RSRC_CONF, \
00056   "Effective user id for this server (NO-OP)"), \
00057 AP_INIT_TAKE1("Group", beosd_set_group, NULL, RSRC_CONF, \
00058   "Effective group id for this server (NO-OP)")
00059 
00060 #endif /* BEOSD_H */