diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-02-03 16:43:54 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-02-03 16:43:54 +0000 |
commit | 25b36fedf72139617dc172dbca887888b258698d (patch) | |
tree | a2279a6ecdbac2779e206eb5da2640bb95f95c99 /src/core/nginx.c | |
parent | a4b16df728abe1e989a8311e901ba5d9ae30328e (diff) | |
download | nginx-25b36fedf72139617dc172dbca887888b258698d.tar.gz nginx-25b36fedf72139617dc172dbca887888b258698d.zip |
nginx-0.0.2-2004-02-03-19:43:54 import
Diffstat (limited to 'src/core/nginx.c')
-rw-r--r-- | src/core/nginx.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c index 61cc53e48..21a22d0ba 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -82,6 +82,7 @@ ngx_int_t ngx_max_module; ngx_uint_t ngx_connection_counter; ngx_int_t ngx_process; +ngx_pid_t ngx_pid; ngx_pid_t ngx_new_binary; ngx_int_t ngx_inherited; @@ -122,6 +123,7 @@ int main(int argc, char *const *argv, char **envp) #endif log = ngx_log_init_errlog(); + ngx_pid = ngx_getpid(); /* init_cycle->log is required for signal handlers */ @@ -179,12 +181,6 @@ int main(int argc, char *const *argv, char **envp) } } - if (dup2(cycle->log->file->fd, STDERR_FILENO) == -1) { - ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, - "dup2(STDERR) failed"); - return 1; - } - if (ccf->pid.len == 0) { ccf->pid.len = sizeof(NGINX_PID) - 1; ccf->pid.data = NGINX_PID; |