Mercurial > hg > nginx-quic
diff src/core/nginx.c @ 278:0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 04 Mar 2004 07:04:55 +0000 |
parents | 7bb9562216ce |
children | b79f021a644a |
line wrap: on
line diff
--- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -5,6 +5,8 @@ #include <nginx.h> +#if 0 + typedef struct { ngx_flag_t daemon; ngx_flag_t master; @@ -30,8 +32,10 @@ static void ngx_worker_process_cycle(ngx #if (NGX_THREADS) static int ngx_worker_thread_cycle(void *data); #endif + +#endif + static ngx_int_t ngx_add_inherited_sockets(ngx_cycle_t *cycle, char **envp); -static ngx_pid_t ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv); static ngx_int_t ngx_getopt(ngx_master_ctx_t *ctx, ngx_cycle_t *cycle); static ngx_int_t ngx_core_module_init(ngx_cycle_t *cycle); static char *ngx_set_user(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); @@ -110,11 +114,9 @@ ngx_int_t ngx_change_binary; int main(int argc, char *const *argv, char **envp) { - ngx_fd_t fd; ngx_int_t i; ngx_log_t *log; ngx_cycle_t *cycle, init_cycle; - ngx_open_file_t *file; ngx_core_conf_t *ccf; ngx_master_ctx_t ctx; #if !(WIN32) @@ -254,6 +256,8 @@ int main(int argc, char *const *argv, ch } +#if 0 + /* TODO: broken NGX_PROCESS_SINGLE */ static void ngx_master_process_cycle(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx) @@ -744,6 +748,8 @@ int ngx_worker_thread_cycle(void *data) #endif +#endif + static ngx_int_t ngx_add_inherited_sockets(ngx_cycle_t *cycle, char **envp) { @@ -791,7 +797,7 @@ static ngx_int_t ngx_add_inherited_socke } -static ngx_pid_t ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv) +ngx_pid_t ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv) { char *env[2], *var, *p; ngx_int_t i; @@ -885,8 +891,8 @@ static ngx_int_t ngx_core_module_init(ng ccf->daemon = NGX_CONF_UNSET; ccf->master = NGX_CONF_UNSET; ccf->worker_reopen = NGX_CONF_UNSET; - ccf->user = (uid_t) NGX_CONF_UNSET; - ccf->group = (gid_t) NGX_CONF_UNSET; + ccf->user = (ngx_uid_t) NGX_CONF_UNSET; + ccf->group = (ngx_gid_t) NGX_CONF_UNSET; ((void **)(cycle->conf_ctx))[ngx_core_module.index] = ccf; @@ -896,6 +902,15 @@ static ngx_int_t ngx_core_module_init(ng static char *ngx_set_user(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { +#if (WIN32) + + ngx_conf_log_error(NGX_LOG_WARN, cf, 0, + "\"user\" is not supported, ignored"); + + return NGX_CONF_OK; + +#else + struct passwd *pwd; struct group *grp; ngx_str_t *value; @@ -932,4 +947,6 @@ static char *ngx_set_user(ngx_conf_t *cf ccf->group = grp->gr_gid; return NGX_CONF_OK; + +#endif }