comparison src/os/unix/ngx_process.c @ 64:5db440287648 NGINX_0_1_32

nginx 0.1.32 *) Bugfix: the arguments were omitted in the redirects, issued by the "rewrite" directive; bug appeared in 0.1.29. *) Feature: the "if" directive supports the captures in regular expressions. *) Feature: the "set" directive supports the variables and the captures of regular expressions. *) Feature: the "X-Accel-Redirect" response header line is supported in proxy and FastCGI mode.
author Igor Sysoev <http://sysoev.ru>
date Thu, 19 May 2005 00:00:00 +0400
parents 72eb30262aac
children e916a291e9aa
comparison
equal deleted inserted replaced
63:e42867135781 64:5db440287648
21 ngx_socket_t ngx_channel; 21 ngx_socket_t ngx_channel;
22 ngx_int_t ngx_last_process; 22 ngx_int_t ngx_last_process;
23 ngx_process_t ngx_processes[NGX_MAX_PROCESSES]; 23 ngx_process_t ngx_processes[NGX_MAX_PROCESSES];
24 24
25 25
26 ngx_pid_t ngx_spawn_process(ngx_cycle_t *cycle, 26 ngx_pid_t
27 ngx_spawn_proc_pt proc, void *data, 27 ngx_spawn_process(ngx_cycle_t *cycle, ngx_spawn_proc_pt proc, void *data,
28 char *name, ngx_int_t respawn) 28 char *name, ngx_int_t respawn)
29 { 29 {
30 u_long on; 30 u_long on;
31 ngx_pid_t pid; 31 ngx_pid_t pid;
32 ngx_int_t s; 32 ngx_int_t s;
33 33
183 183
184 return pid; 184 return pid;
185 } 185 }
186 186
187 187
188 ngx_pid_t ngx_execute(ngx_cycle_t *cycle, ngx_exec_ctx_t *ctx) 188 ngx_pid_t
189 ngx_execute(ngx_cycle_t *cycle, ngx_exec_ctx_t *ctx)
189 { 190 {
190 return ngx_spawn_process(cycle, ngx_execute_proc, ctx, ctx->name, 191 return ngx_spawn_process(cycle, ngx_execute_proc, ctx, ctx->name,
191 NGX_PROCESS_DETACHED); 192 NGX_PROCESS_DETACHED);
192 } 193 }
193 194
194 195
195 static void ngx_execute_proc(ngx_cycle_t *cycle, void *data) 196 static void
197 ngx_execute_proc(ngx_cycle_t *cycle, void *data)
196 { 198 {
197 ngx_exec_ctx_t *ctx = data; 199 ngx_exec_ctx_t *ctx = data;
198 200
199 if (execve(ctx->path, ctx->argv, ctx->envp) == -1) { 201 if (execve(ctx->path, ctx->argv, ctx->envp) == -1) {
200 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, 202 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
204 206
205 exit(1); 207 exit(1);
206 } 208 }
207 209
208 210
209 void ngx_process_get_status() 211 void
212 ngx_process_get_status(void)
210 { 213 {
211 int status; 214 int status;
212 char *process; 215 char *process;
213 ngx_pid_t pid; 216 ngx_pid_t pid;
214 ngx_err_t err; 217 ngx_err_t err;
299 } 302 }
300 } 303 }
301 } 304 }
302 305
303 306
304 void ngx_debug_point() 307 void
308 ngx_debug_point(void)
305 { 309 {
306 ngx_core_conf_t *ccf; 310 ngx_core_conf_t *ccf;
307 311
308 ccf = (ngx_core_conf_t *) ngx_get_conf(ngx_cycle->conf_ctx, 312 ccf = (ngx_core_conf_t *) ngx_get_conf(ngx_cycle->conf_ctx,
309 ngx_core_module); 313 ngx_core_module);