-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlighttpd.patch
59 lines (56 loc) · 1.44 KB
/
lighttpd.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
--- old/lighttpd1.4-lighttpd-1.4.56/src/server.c 2020-11-30 05:31:14.000000000 +0800
+++ new/lighttpd1.4-lighttpd-1.4.56/src/server.c 2022-02-20 18:48:35.802869303 +0800
@@ -1165,7 +1165,7 @@
return -1;
}
}
-
+#if 0
/* close stdin and stdout, as they are not needed */
{
struct stat st;
@@ -1198,7 +1198,7 @@
if (devnull != errfd) close(devnull);
#endif
}
-
+#endif
http_response_send_1xx_cb_set(NULL, HTTP_VERSION_2);
if (srv->srvconf.feature_flags
&& !config_plugin_value_tobool(
@@ -1529,7 +1529,7 @@
log_error(srv->errh, __FILE__, __LINE__,
"server idle time limit command line option disables server.max-worker config file option.");
}
-
+int lighty_worker_index = -1;
/* start watcher and workers */
num_childs = srv->srvconf.max_worker;
if (num_childs > 0) {
@@ -1542,10 +1542,12 @@
server_graceful_signal_prev_generation();
while (!child && !srv_shutdown && !graceful_shutdown) {
if (num_childs > 0) {
+ lighty_worker_index++;
switch ((pid = fork())) {
case -1:
return -1;
case 0:
+ init_worker(lighty_worker_index);
child = 1;
alarm(0);
break;
@@ -1904,7 +1906,7 @@
}
connections * const joblist = connection_joblist;
-
+batch_start();
if (fdevent_poll(srv->ev, joblist->used ? 0 : 1000) > 0) {
last_active_ts = log_epoch_secs;
}
@@ -1914,6 +1916,7 @@
: &srv->joblist_A;
server_run_con_queue(joblist);
+batch_flush();
}
}