diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-05-20 19:37:55 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-05-20 19:37:55 +0400 |
commit | 1c13c662f0ae8066d1d4849b4158d7459a4c7822 (patch) | |
tree | a8e517c0d41e922b1d3744d869edc60ed540b2d9 /src/os/unix/ngx_daemon.c | |
parent | a98301160de4c12f455cca8f78509f2e04626c0b (diff) |
nginx-0.0.1-2003-05-20-19:37:55 import
Diffstat (limited to 'src/os/unix/ngx_daemon.c')
-rw-r--r-- | src/os/unix/ngx_daemon.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/os/unix/ngx_daemon.c b/src/os/unix/ngx_daemon.c index 6faf85b06..93d3571b0 100644 --- a/src/os/unix/ngx_daemon.c +++ b/src/os/unix/ngx_daemon.c @@ -11,7 +11,7 @@ int ngx_daemon(ngx_log_t *log) switch (fork()) { case -1: - ngx_log_error(NGX_LOG_ALERT, log, errno, "fork() failed"); + ngx_log_error(NGX_LOG_EMERG, log, errno, "fork() failed"); return NGX_ERROR; case 0: @@ -22,7 +22,7 @@ int ngx_daemon(ngx_log_t *log) } if (setsid() == -1) { - ngx_log_error(NGX_LOG_ALERT, log, errno, "setsid() failed"); + ngx_log_error(NGX_LOG_EMERG, log, errno, "setsid() failed"); return NGX_ERROR; } @@ -32,7 +32,7 @@ int ngx_daemon(ngx_log_t *log) switch (fork()) { case -1: - ngx_log_error(NGX_LOG_ALERT, log, errno, "fork() failed"); + ngx_log_error(NGX_LOG_EMERG, log, errno, "fork() failed"); return NGX_ERROR; case 0: @@ -49,28 +49,28 @@ int ngx_daemon(ngx_log_t *log) #if 0 fd = open("/dev/null", O_RDWR); if (fd == -1) { - ngx_log_error(NGX_LOG_ALERT, log, errno, "open(\"/dev/null\") failed"); + ngx_log_error(NGX_LOG_EMERG, log, errno, "open(\"/dev/null\") failed"); return NGX_ERROR; } if (dup2(fd, STDIN_FILENO) == -1) { - ngx_log_error(NGX_LOG_ALERT, log, errno, "dup2(STDIN) failed"); + ngx_log_error(NGX_LOG_EMERG, log, errno, "dup2(STDIN) failed"); return NGX_ERROR; } if (dup2(fd, STDOUT_FILENO) == -1) { - ngx_log_error(NGX_LOG_ALERT, log, errno, "dup2(STDOUT) failed"); + ngx_log_error(NGX_LOG_EMERG, log, errno, "dup2(STDOUT) failed"); return NGX_ERROR; } if (dup2(fd, STDERR_FILENO) == -1) { - ngx_log_error(NGX_LOG_ALERT, log, errno, "dup2(STDERR) failed"); + ngx_log_error(NGX_LOG_EMERG, log, errno, "dup2(STDERR) failed"); return NGX_ERROR; } if (fd > STDERR_FILENO) { if (close(fd) == -1) { - ngx_log_error(NGX_LOG_ALERT, log, errno, "close() failed"); + ngx_log_error(NGX_LOG_EMERG, log, errno, "close() failed"); return NGX_ERROR; } } |