Mercurial > hg > nginx-quic
annotate src/os/win32/ngx_process.h @ 6956:9b5f31fdb850
HTTP/2: fixed stream finalization.
In order to finalize stream the error flag is set on fake connection and
either "write" or "read" event handler is called. The read events of fake
connections are always ready, but it's not the case with the write events.
When the ready flag isn't set, the error flag can be not checked in some
cases and as a result stream isn't finalized. Now the ready flag is
explicilty set on write events for proper finalization in all cases.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Wed, 29 Mar 2017 20:16:23 +0300 |
parents | 7296b38f6416 |
children | 8b84d60ef13d |
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 |
6402
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4412
diff
changeset
|
24 typedef uint64_t ngx_cpuset_t; |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4412
diff
changeset
|
25 |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4412
diff
changeset
|
26 |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
27 typedef struct { |
2725 | 28 HANDLE handle; |
29 ngx_pid_t pid; | |
30 char *name; | |
31 | |
32 HANDLE term; | |
33 HANDLE quit; | |
34 HANDLE reopen; | |
35 | |
36 u_char term_event[NGX_PROCESS_SYNC_NAME]; | |
37 u_char quit_event[NGX_PROCESS_SYNC_NAME]; | |
38 u_char reopen_event[NGX_PROCESS_SYNC_NAME]; | |
39 | |
3016
d82993af1da0
introduce NGX_PROCESS_JUST_SPAWN and change field name accordingly
Igor Sysoev <igor@sysoev.ru>
parents:
2745
diff
changeset
|
40 unsigned just_spawn:1; |
2725 | 41 unsigned exiting:1; |
42 } ngx_process_t; | |
43 | |
44 | |
45 typedef struct { | |
46 char *path; | |
47 char *name; | |
2745
1983932b8075
pass command lines options to workers
Igor Sysoev <igor@sysoev.ru>
parents:
2725
diff
changeset
|
48 char *args; |
2725 | 49 char *const *argv; |
50 char *const *envp; | |
51 HANDLE child; | |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
52 } 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
|
53 |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
54 |
2725 | 55 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
|
56 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
|
57 |
461 | 58 #define ngx_debug_point() |
3852
3f04918aefe5
use SwitchToThread() instead of Sleep(0), because the later
Igor Sysoev <igor@sysoev.ru>
parents:
3358
diff
changeset
|
59 #define ngx_sched_yield() SwitchToThread() |
2725 | 60 |
61 | |
62 #define NGX_MAX_PROCESSES (MAXIMUM_WAIT_OBJECTS - 4) | |
63 | |
64 #define NGX_PROCESS_RESPAWN -2 | |
65 #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
|
66 |
018569a8f09c
nginx-0.0.7-2004-06-30-19:30:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
67 |
2725 | 68 extern int ngx_argc; |
69 extern char **ngx_argv; | |
70 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
|
71 |
2725 | 72 extern ngx_int_t ngx_last_process; |
73 extern ngx_process_t ngx_processes[NGX_MAX_PROCESSES]; | |
74 | |
75 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
|
76 |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
77 |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
78 #endif /* _NGX_PROCESS_H_INCLUDED_ */ |