aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix')
-rw-r--r--src/os/unix/ngx_posix_init.c5
-rw-r--r--src/os/unix/ngx_process.c19
2 files changed, 5 insertions, 19 deletions
diff --git a/src/os/unix/ngx_posix_init.c b/src/os/unix/ngx_posix_init.c
index d46a65d11..bacd03535 100644
--- a/src/os/unix/ngx_posix_init.c
+++ b/src/os/unix/ngx_posix_init.c
@@ -99,8 +99,11 @@ int ngx_posix_init(ngx_log_t *log)
void ngx_signal_handler(int signo)
{
struct timeval tv;
+ ngx_err_t err;
ngx_signal_t *sig;
+ err = ngx_errno;
+
for (sig = signals; sig->signo != 0; sig++) {
if (sig->signo == signo) {
break;
@@ -141,6 +144,8 @@ void ngx_signal_handler(int signo)
ngx_change_binary = 1;
break;
}
+
+ ngx_set_errno(err);
}
diff --git a/src/os/unix/ngx_process.c b/src/os/unix/ngx_process.c
index f7314a45e..e50040820 100644
--- a/src/os/unix/ngx_process.c
+++ b/src/os/unix/ngx_process.c
@@ -211,25 +211,6 @@ void ngx_respawn_processes(ngx_cycle_t *cycle)
}
-#if 0
-void ngx_sigchld_handler(int signo)
-{
- int status;
- char *process;
- ngx_pid_t pid;
- ngx_err_t err;
- ngx_uint_t i, one;
- struct timeval tv;
-
- ngx_gettimeofday(&tv);
- ngx_time_update(tv.tv_sec);
-
- ngx_log_error(NGX_LOG_INFO, ngx_cycle->log, 0,
- "signal #%d (SIGCHLD) received", signo);
-}
-#endif
-
-
void ngx_process_get_status()
{
int status;