diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-07-03 16:30:22 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-07-03 16:30:22 +0000 |
commit | 7349befe26d264159cacc4d3dee3964b32e79c83 (patch) | |
tree | b83383a178e65c8f0615baa94db5143119d8a029 /src/core/nginx.c | |
parent | 9d9f58f24d318dad43c7019c40a187555aaa64c8 (diff) | |
download | nginx-7349befe26d264159cacc4d3dee3964b32e79c83.tar.gz nginx-7349befe26d264159cacc4d3dee3964b32e79c83.zip |
nginx-0.0.1-2003-07-03-20:30:22 import
Diffstat (limited to 'src/core/nginx.c')
-rw-r--r-- | src/core/nginx.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c index 30ebf3fe9..89dd6f04e 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -22,7 +22,9 @@ int ngx_max_module; int ngx_connection_counter; -#if 1 +int restart; +int rotate; + int main(int argc, char *const *argv) { @@ -53,6 +55,8 @@ int main(int argc, char *const *argv) /* life cycle */ for ( ;; ) { + /* STUB */ cycle->log->file->fd = log->file->fd; + /* STUB */ cycle->log->log_level = NGX_LOG_DEBUG; /* STUB */ ngx_io = ngx_os_io; @@ -66,9 +70,26 @@ int main(int argc, char *const *argv) /* threads */ + restart = 0; + rotate = 0; + for ( ;; ) { - ngx_worker(cycle); + for ( ;; ) { + ngx_log_debug(cycle->log, "worker cycle"); + + ngx_process_events(cycle->log); + + if (rotate) { + ngx_log_debug(cycle->log, "rotate"); + } + + if (restart) { + ngx_log_debug(cycle->log, "restart"); + break; + } + + } new_cycle = ngx_init_cycle(cycle, cycle->log); if (new_cycle == NULL) { @@ -316,7 +337,7 @@ static ngx_cycle_t *ngx_init_cycle(ngx_cycle_t *old_cycle, ngx_log_t *log) -#else +#if 0 int main(int argc, char *const *argv) |