comparison src/core/nginx.c @ 115:be27f922b9a2

nginx-0.0.1-2003-07-10-20:26:57 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 10 Jul 2003 16:26:57 +0000
parents ac69ab96328d
children f6e3c5d019b6
comparison
equal deleted inserted replaced
114:ac69ab96328d 115:be27f922b9a2
59 return 1; 59 return 1;
60 } 60 }
61 61
62 ngx_cycle = cycle; 62 ngx_cycle = cycle;
63 63
64 /* daemon */ 64 #if !(WIN32)
65
66 if (0) {
67 if (ngx_daemon(cycle->log) == NGX_ERROR) {
68 return 1;
69 }
70 }
71
72 if (dup2(cycle->log->file->fd, STDERR_FILENO) == -1) {
73 ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, "dup2(STDERR) failed");
74 return 1;
75 }
76
77 #endif
65 78
66 /* life cycle */ 79 /* life cycle */
67 80
68 for ( ;; ) { 81 for ( ;; ) {
69 /* STUB */ ngx_cycle->log->log_level = NGX_LOG_DEBUG; 82 /* STUB */ ngx_cycle->log->log_level = NGX_LOG_DEBUG;
152 cycle->open_files.nelts = 0; 165 cycle->open_files.nelts = 0;
153 cycle->open_files.size = sizeof(ngx_open_file_t); 166 cycle->open_files.size = sizeof(ngx_open_file_t);
154 cycle->open_files.nalloc = n; 167 cycle->open_files.nalloc = n;
155 cycle->open_files.pool = pool; 168 cycle->open_files.pool = pool;
156 169
157 cycle->log = ngx_log_create_errlog(cycle); 170 cycle->log = ngx_log_create_errlog(cycle, NULL);
158 if (cycle->log == NULL) { 171 if (cycle->log == NULL) {
159 ngx_destroy_pool(pool); 172 ngx_destroy_pool(pool);
160 return NULL; 173 return NULL;
161 } 174 }
162 175