Mercurial > hg > nginx
annotate src/os/win32/ngx_process.h @ 4357:efd515ace6bb stable-1.0
Merge of r4270, r4274:
Minor cleanup:
*) Changed error message to be more appropriate in the imaginary
"open_file_cache max=0" case.
*) Fixed NGX_CONF_TAKE1/NGX_CONF_FLAG misuse.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 14 Dec 2011 14:31:55 +0000 |
parents | 3f04918aefe5 |
children | d620f497c50f |
rev | line source |
---|---|
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
1 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
2 /* |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
441
diff
changeset
|
3 * Copyright (C) Igor Sysoev |
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
4 */ |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
5 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
6 |
36
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
7 #ifndef _NGX_PROCESS_H_INCLUDED_ |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 #define _NGX_PROCESS_H_INCLUDED_ |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
2725 | 11 typedef DWORD ngx_pid_t; |
12 #define NGX_INVALID_PID 0 | |
543 | 13 |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
14 |
2725 | 15 #define ngx_getpid GetCurrentProcessId |
16 #define ngx_log_pid ngx_pid | |
17 | |
18 | |
19 #define NGX_PROCESS_SYNC_NAME \ | |
20 (sizeof("ngx_cache_manager_mutex_") + NGX_INT32_LEN) | |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
21 |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
22 |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
23 typedef struct { |
2725 | 24 HANDLE handle; |
25 ngx_pid_t pid; | |
26 char *name; | |
27 | |
28 HANDLE term; | |
29 HANDLE quit; | |
30 HANDLE reopen; | |
31 | |
32 u_char term_event[NGX_PROCESS_SYNC_NAME]; | |
33 u_char quit_event[NGX_PROCESS_SYNC_NAME]; | |
34 u_char reopen_event[NGX_PROCESS_SYNC_NAME]; | |
35 | |
3016
d82993af1da0
introduce NGX_PROCESS_JUST_SPAWN and change field name accordingly
Igor Sysoev <igor@sysoev.ru>
parents:
2745
diff
changeset
|
36 unsigned just_spawn:1; |
2725 | 37 unsigned exiting:1; |
38 } ngx_process_t; | |
39 | |
40 | |
41 typedef struct { | |
42 char *path; | |
43 char *name; | |
2745
1983932b8075
pass command lines options to workers
Igor Sysoev <igor@sysoev.ru>
parents:
2725
diff
changeset
|
44 char *args; |
2725 | 45 char *const *argv; |
46 char *const *envp; | |
47 HANDLE child; | |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
48 } ngx_exec_ctx_t; |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
49 |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
50 |
2725 | 51 ngx_pid_t ngx_spawn_process(ngx_cycle_t *cycle, char *name, ngx_int_t respawn); |
279
b79f021a644a
nginx-0.0.2-2004-03-04-19:34:23 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
52 ngx_pid_t ngx_execute(ngx_cycle_t *cycle, ngx_exec_ctx_t *ctx); |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
53 |
461 | 54 #define ngx_debug_point() |
3852
3f04918aefe5
use SwitchToThread() instead of Sleep(0), because the later
Igor Sysoev <igor@sysoev.ru>
parents:
3358
diff
changeset
|
55 #define ngx_sched_yield() SwitchToThread() |
2725 | 56 |
57 | |
58 #define NGX_MAX_PROCESSES (MAXIMUM_WAIT_OBJECTS - 4) | |
59 | |
60 #define NGX_PROCESS_RESPAWN -2 | |
61 #define NGX_PROCESS_JUST_RESPAWN -3 | |
373
018569a8f09c
nginx-0.0.7-2004-06-30-19:30:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
62 |
018569a8f09c
nginx-0.0.7-2004-06-30-19:30:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
63 |
2725 | 64 extern int ngx_argc; |
65 extern char **ngx_argv; | |
66 extern char **ngx_os_argv; | |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
67 |
2725 | 68 extern ngx_int_t ngx_last_process; |
69 extern ngx_process_t ngx_processes[NGX_MAX_PROCESSES]; | |
70 | |
71 extern ngx_pid_t ngx_pid; | |
36
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
72 |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
73 |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
74 #endif /* _NGX_PROCESS_H_INCLUDED_ */ |