comparison src/core/ngx_cycle.c @ 249:2a0540287298

nginx-0.0.2-2004-02-03-19:43:54 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 03 Feb 2004 16:43:54 +0000
parents 8d5cce3ae221
children e6938ca7331a
comparison
equal deleted inserted replaced
248:e885208c518b 249:2a0540287298
226 failed = 1; 226 failed = 1;
227 } 227 }
228 } 228 }
229 } 229 }
230 230
231 /* TODO: Win32 DuplicateHandle ? */
232 if (dup2(cycle->log->file->fd, STDERR_FILENO) == -1) {
233 ngx_log_error(NGX_LOG_EMERG, log, ngx_errno,
234 "dup2(STDERR) failed");
235 failed = 1;
236 }
237
238
231 if (failed) { 239 if (failed) {
232 240
233 /* rollback the new cycle configuration */ 241 /* rollback the new cycle configuration */
234 242
235 file = cycle->open_files.elts; 243 file = cycle->open_files.elts;
259 } 267 }
260 268
261 ngx_destroy_pool(pool); 269 ngx_destroy_pool(pool);
262 return NULL; 270 return NULL;
263 } 271 }
272
264 273
265 /* commit the new cycle configuration */ 274 /* commit the new cycle configuration */
266 275
267 pool->log = cycle->log; 276 pool->log = cycle->log;
268 277
436 file[i].name.data); 445 file[i].name.data);
437 } 446 }
438 447
439 file[i].fd = fd; 448 file[i].fd = fd;
440 } 449 }
450
451 /* TODO: Win32 DuplicateHandle ? */
452 if (dup2(cycle->log->file->fd, STDERR_FILENO) == -1) {
453 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
454 "dup2(STDERR) failed");
455 }
441 } 456 }
442 457
443 458
444 static void ngx_clean_old_cycles(ngx_event_t *ev) 459 static void ngx_clean_old_cycles(ngx_event_t *ev)
445 { 460 {