Mercurial > hg > nginx
diff src/core/nginx.c @ 111:1c002f2b77ed
nginx-0.0.1-2003-07-03-20:30:22 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 03 Jul 2003 16:30:22 +0000 |
parents | 152567c11325 |
children | d7f606e25b99 |
line wrap: on
line diff
--- a/src/core/nginx.c Wed Jul 02 18:51:41 2003 +0000 +++ b/src/core/nginx.c Thu Jul 03 16:30:22 2003 +0000 @@ -22,7 +22,9 @@ int ngx_connection_counter; -#if 1 +int restart; +int rotate; + int main(int argc, char *const *argv) { @@ -53,6 +55,8 @@ /* 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 @@ /* 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 @@ -#else +#if 0 int main(int argc, char *const *argv)