Mercurial > hg > nginx-quic
annotate src/os/win32/ngx_process.h @ 6081:12ab5cd445c0 stable-1.6
Core: fixed potential buffer overrun when initializing hash.
Initial size as calculated from the number of elements may be bigger
than max_size. If this happens, make sure to set size to max_size.
Reported by Chris West.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 24 Feb 2015 18:37:14 +0300 |
parents | d620f497c50f |
children | 7296b38f6416 |
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 |
4412 | 4 * Copyright (C) Nginx, Inc. |
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
|
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 |
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
|
7 |
36
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 #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
|
9 #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
|
10 |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
11 |
2725 | 12 typedef DWORD ngx_pid_t; |
13 #define NGX_INVALID_PID 0 | |
543 | 14 |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
15 |
2725 | 16 #define ngx_getpid GetCurrentProcessId |
17 #define ngx_log_pid ngx_pid | |
18 | |
19 | |
20 #define NGX_PROCESS_SYNC_NAME \ | |
21 (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
|
22 |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
23 |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
24 typedef struct { |
2725 | 25 HANDLE handle; |
26 ngx_pid_t pid; | |
27 char *name; | |
28 | |
29 HANDLE term; | |
30 HANDLE quit; | |
31 HANDLE reopen; | |
32 | |
33 u_char term_event[NGX_PROCESS_SYNC_NAME]; | |
34 u_char quit_event[NGX_PROCESS_SYNC_NAME]; | |
35 u_char reopen_event[NGX_PROCESS_SYNC_NAME]; | |
36 | |
3016
d82993af1da0
introduce NGX_PROCESS_JUST_SPAWN and change field name accordingly
Igor Sysoev <igor@sysoev.ru>
parents:
2745
diff
changeset
|
37 unsigned just_spawn:1; |
2725 | 38 unsigned exiting:1; |
39 } ngx_process_t; | |
40 | |
41 | |
42 typedef struct { | |
43 char *path; | |
44 char *name; | |
2745
1983932b8075
pass command lines options to workers
Igor Sysoev <igor@sysoev.ru>
parents:
2725
diff
changeset
|
45 char *args; |
2725 | 46 char *const *argv; |
47 char *const *envp; | |
48 HANDLE child; | |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
49 } 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
|
50 |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
51 |
2725 | 52 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
|
53 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
|
54 |
461 | 55 #define ngx_debug_point() |
3852
3f04918aefe5
use SwitchToThread() instead of Sleep(0), because the later
Igor Sysoev <igor@sysoev.ru>
parents:
3358
diff
changeset
|
56 #define ngx_sched_yield() SwitchToThread() |
2725 | 57 |
58 | |
59 #define NGX_MAX_PROCESSES (MAXIMUM_WAIT_OBJECTS - 4) | |
60 | |
61 #define NGX_PROCESS_RESPAWN -2 | |
62 #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
|
63 |
018569a8f09c
nginx-0.0.7-2004-06-30-19:30:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
64 |
2725 | 65 extern int ngx_argc; |
66 extern char **ngx_argv; | |
67 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
|
68 |
2725 | 69 extern ngx_int_t ngx_last_process; |
70 extern ngx_process_t ngx_processes[NGX_MAX_PROCESSES]; | |
71 | |
72 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
|
73 |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
74 |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
75 #endif /* _NGX_PROCESS_H_INCLUDED_ */ |