diff --git a/include/haproxy/mworker-t.h b/include/haproxy/mworker-t.h index 3137ec0be..46e125f36 100644 --- a/include/haproxy/mworker-t.h +++ b/include/haproxy/mworker-t.h @@ -24,7 +24,9 @@ #define PROC_O_TYPE_PROG 0x00000004 /* 0x00000008 unused */ #define PROC_O_LEAVING 0x00000010 /* this process should be leaving */ -/* 0x00000020 to 0x00000080 unused */ +/* state of the newly forked worker process, which hasn't sent yet its READY message to master */ +#define PROC_O_INIT 0x00000020 +/* 0x00000040 to 0x00000080 unused */ #define PROC_O_START_RELOAD 0x00000100 /* Start the process even if the master was re-executed */ /* diff --git a/src/haproxy.c b/src/haproxy.c index e9198704b..c6107e0da 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2095,8 +2095,8 @@ static void init(int argc, char **argv) ha_alert("Cannot allocate process structures.\n"); exit(EXIT_FAILURE); } - tmproc->options |= PROC_O_TYPE_WORKER; /* worker */ - + /* worker */ + tmproc->options |= (PROC_O_TYPE_WORKER | PROC_O_INIT); /* create a sockpair to copy it via fork(), thus it will be in * master and in worker processes */