nginx-0.0.1-2004-01-13-19:43:23 import
diff --git a/src/os/unix/ngx_os.h b/src/os/unix/ngx_os.h
index 4f59137..8d9a6de 100644
--- a/src/os/unix/ngx_os.h
+++ b/src/os/unix/ngx_os.h
@@ -51,10 +51,11 @@
extern ngx_int_t ngx_process;
+extern ngx_int_t ngx_signal;
extern ngx_int_t ngx_reap;
extern ngx_int_t ngx_quit;
extern ngx_int_t ngx_terminate;
-extern ngx_int_t ngx_pause;
+extern ngx_int_t ngx_noaccept;
extern ngx_int_t ngx_reconfigure;
extern ngx_int_t ngx_reopen;
extern ngx_int_t ngx_change_binary;
diff --git a/src/os/unix/ngx_posix_init.c b/src/os/unix/ngx_posix_init.c
index 374f60b..d5f28d0 100644
--- a/src/os/unix/ngx_posix_init.c
+++ b/src/os/unix/ngx_posix_init.c
@@ -26,8 +26,8 @@
"SIG" ngx_value(NGX_REOPEN_SIGNAL),
ngx_signal_handler },
- { ngx_signal_value(NGX_PAUSE_SIGNAL),
- "SIG" ngx_value(NGX_PAUSE_SIGNAL),
+ { ngx_signal_value(NGX_NOACCEPT_SIGNAL),
+ "SIG" ngx_value(NGX_NOACCEPT_SIGNAL),
ngx_signal_handler },
{ ngx_signal_value(NGX_TERMINATE_SIGNAL),
@@ -96,6 +96,8 @@
ngx_err_t err;
ngx_signal_t *sig;
+ ngx_signal = 1;
+
err = ngx_errno;
for (sig = signals; sig->signo != 0; sig++) {
@@ -112,8 +114,6 @@
switch (ngx_process) {
case NGX_PROCESS_MASTER:
- case NGX_PROCESS_QUITING:
- case NGX_PROCESS_PAUSED:
switch (signo) {
case ngx_signal_value(NGX_SHUTDOWN_SIGNAL):
@@ -122,13 +122,14 @@
break;
case ngx_signal_value(NGX_TERMINATE_SIGNAL):
+ case SIGINT:
ngx_terminate = 1;
action = ", exiting";
break;
- case ngx_signal_value(NGX_PAUSE_SIGNAL):
- ngx_pause = 1;
- action = ", pausing";
+ case ngx_signal_value(NGX_NOACCEPT_SIGNAL):
+ ngx_noaccept = 1;
+ action = ", stop the accepting connections";
break;
case ngx_signal_value(NGX_RECONFIGURE_SIGNAL):
@@ -162,6 +163,7 @@
break;
case ngx_signal_value(NGX_TERMINATE_SIGNAL):
+ case SIGINT:
ngx_terminate = 1;
action = ", exiting";
break;
@@ -175,7 +177,7 @@
case ngx_signal_value(NGX_RECONFIGURE_SIGNAL):
case ngx_signal_value(NGX_REOPEN_SIGNAL):
- case ngx_signal_value(NGX_PAUSE_SIGNAL):
+ case ngx_signal_value(NGX_NOACCEPT_SIGNAL):
case ngx_signal_value(NGX_CHANGEBIN_SIGNAL):
action = ", ignoring";
break;
diff --git a/src/os/unix/ngx_process.c b/src/os/unix/ngx_process.c
index b660d8b..4a80257 100644
--- a/src/os/unix/ngx_process.c
+++ b/src/os/unix/ngx_process.c
@@ -9,7 +9,7 @@
ngx_process_t ngx_processes[NGX_MAX_PROCESSES];
-ngx_int_t ngx_spawn_process(ngx_cycle_t *cycle,
+ngx_pid_t ngx_spawn_process(ngx_cycle_t *cycle,
ngx_spawn_proc_pt proc, void *data,
char *name, ngx_int_t respawn)
{
@@ -59,7 +59,7 @@
if (respawn >= 0) {
ngx_processes[respawn].pid = pid;
ngx_processes[respawn].exited = 0;
- return NGX_OK;
+ return pid;
}
ngx_processes[ngx_last_process].pid = pid;
@@ -81,7 +81,7 @@
return NGX_ERROR;
}
- return NGX_OK;
+ return pid;
}
diff --git a/src/os/unix/ngx_process.h b/src/os/unix/ngx_process.h
index a71f682..1eb545b 100644
--- a/src/os/unix/ngx_process.h
+++ b/src/os/unix/ngx_process.h
@@ -33,19 +33,17 @@
#define NGX_PROCESS_SINGLE 0
#define NGX_PROCESS_MASTER 1
#define NGX_PROCESS_WORKER 2
-#define NGX_PROCESS_QUITING 3
-#define NGX_PROCESS_PAUSED 4
#define NGX_MAX_PROCESSES 1024
-#define NGX_PROCESS_RESPAWN -1
-#define NGX_PROCESS_NORESPAWN -2
+#define NGX_PROCESS_NORESPAWN -1
+#define NGX_PROCESS_RESPAWN -2
#define NGX_PROCESS_DETACHED -3
#define ngx_getpid getpid
-ngx_int_t ngx_spawn_process(ngx_cycle_t *cycle,
+ngx_pid_t ngx_spawn_process(ngx_cycle_t *cycle,
ngx_spawn_proc_pt proc, void *data,
char *name, ngx_int_t respawn);
ngx_int_t ngx_exec(ngx_cycle_t *cycle, ngx_exec_ctx_t *ctx);