aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_process_cycle.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-10-11 15:07:03 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-10-11 15:07:03 +0000
commit924bd79e317e9a137c0d1b9d349185758a628ec4 (patch)
treef877c8b19e53e7d0a7683e3dd9aeb713146c4a8f /src/os/unix/ngx_process_cycle.c
parentaef13d7f6660f4f8d2c50c95b8e182e62c115f88 (diff)
downloadnginx-924bd79e317e9a137c0d1b9d349185758a628ec4.tar.gz
nginx-924bd79e317e9a137c0d1b9d349185758a628ec4.zip
nginx-0.1.1-RELEASE importrelease-0.1.1
*) Feature: the gzip_types directive. *) Feature: the tcp_nodelay directive. *) Feature: the send_lowat directive is working not only on OSes that support kqueue NOTE_LOWAT, but also on OSes that support SO_SNDLOWAT. *) Feature: the setproctitle() emulation for Linux and Solaris. *) Bugfix: the "Location" header rewrite bug fixed while the proxying. *) Bugfix: the ngx_http_chunked_module module may get caught in an endless loop. *) Bugfix: the /dev/poll module bugs fixed. *) Bugfix: the responses were corrupted when the temporary files were used while the proxying. *) Bugfix: the unescaped requests were passed to the backend. *) Bugfix: while the build configuration on Linux 2.4 the --with-poll_module parameter was required.
Diffstat (limited to 'src/os/unix/ngx_process_cycle.c')
-rw-r--r--src/os/unix/ngx_process_cycle.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c
index 4d4db54c6..c43a7eb00 100644
--- a/src/os/unix/ngx_process_cycle.c
+++ b/src/os/unix/ngx_process_cycle.c
@@ -14,7 +14,7 @@ static void ngx_start_worker_processes(ngx_cycle_t *cycle, ngx_int_t n,
ngx_int_t type);
static void ngx_signal_worker_processes(ngx_cycle_t *cycle, int signo);
static ngx_uint_t ngx_reap_childs(ngx_cycle_t *cycle);
-static void ngx_master_exit(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx);
+static void ngx_master_exit(ngx_cycle_t *cycle);
static void ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data);
static void ngx_channel_handler(ngx_event_t *ev);
#if (NGX_THREADS)
@@ -55,7 +55,7 @@ ngx_int_t ngx_threads_n;
u_char master_process[] = "master process";
-void ngx_master_process_cycle(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx)
+void ngx_master_process_cycle(ngx_cycle_t *cycle)
{
char *title;
u_char *p;
@@ -90,16 +90,16 @@ void ngx_master_process_cycle(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx)
size = sizeof(master_process);
- for (i = 0; i < ctx->argc; i++) {
- size += ngx_strlen(ctx->argv[i]) + 1;
+ for (i = 0; i < ngx_argc; i++) {
+ size += ngx_strlen(ngx_argv[i]) + 1;
}
title = ngx_palloc(cycle->pool, size);
p = ngx_cpymem(title, master_process, sizeof(master_process) - 1);
- for (i = 0; i < ctx->argc; i++) {
+ for (i = 0; i < ngx_argc; i++) {
*p++ = ' ';
- p = ngx_cpystrn(p, (u_char *) ctx->argv[i], size);
+ p = ngx_cpystrn(p, (u_char *) ngx_argv[i], size);
}
ngx_setproctitle(title);
@@ -149,7 +149,7 @@ void ngx_master_process_cycle(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx)
}
if (!live && (ngx_terminate || ngx_quit)) {
- ngx_master_exit(cycle, ctx);
+ ngx_master_exit(cycle);
}
if (ngx_terminate) {
@@ -231,7 +231,7 @@ void ngx_master_process_cycle(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx)
if (ngx_change_binary) {
ngx_change_binary = 0;
ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "changing binary");
- ngx_new_binary = ngx_exec_new_binary(cycle, ctx->argv);
+ ngx_new_binary = ngx_exec_new_binary(cycle, ngx_argv);
}
if (ngx_noaccept) {
@@ -244,14 +244,10 @@ void ngx_master_process_cycle(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx)
}
-void ngx_single_process_cycle(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx)
+void ngx_single_process_cycle(ngx_cycle_t *cycle)
{
ngx_uint_t i;
-#if 0
- ngx_setproctitle("single worker process");
-#endif
-
ngx_init_temp_number();
for (i = 0; ngx_modules[i]; i++) {
@@ -269,7 +265,7 @@ void ngx_single_process_cycle(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx)
ngx_process_events(cycle);
if (ngx_terminate || ngx_quit) {
- ngx_master_exit(cycle, ctx);
+ ngx_master_exit(cycle);
}
if (ngx_reconfigure) {
@@ -547,7 +543,7 @@ static ngx_uint_t ngx_reap_childs(ngx_cycle_t *cycle)
}
-static void ngx_master_exit(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx)
+static void ngx_master_exit(ngx_cycle_t *cycle)
{
ngx_delete_pidfile(cycle);