aboutsummaryrefslogtreecommitdiff
path: root/gmid.h
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-03-03 17:22:01 +0000
committerOmar Polo <op@omarpolo.com>2021-03-03 17:22:01 +0000
commit2c3e53dac6faed4d9502bd3310b4837f0d3112cf (patch)
treebaaaccb963b920152e486c66672add78629b9d3e /gmid.h
parentfda7b99fc7f19b04eced114983268cfe3eb46c99 (diff)
give each server process its own socket for the executor
this fixes a bug introduced with the prefork mechanics: every server process shared the same socket, and this would cause a race condition when multiple server processes asked for a script cgi being executed. This gives each server process its own socket to talk to the executor, so the race cannot happen.
Diffstat (limited to 'gmid.h')
-rw-r--r--gmid.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gmid.h b/gmid.h
index e926f9c..b858ebc 100644
--- a/gmid.h
+++ b/gmid.h
@@ -56,6 +56,8 @@
#define DOMAIN_NAME_LEN (253+1)
#define LABEL_LEN (63+1)
+#define PROC_MAX 16
+
struct location {
const char *match;
const char *lang;
@@ -120,6 +122,8 @@ extern struct imsgbuf logpibuf, logcibuf;
extern volatile sig_atomic_t hupped;
+extern int servpipes[PROC_MAX];
+
struct iri {
char *schema;
char *host;