mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-09 14:58:25 +00:00
BUG/MINOR: mworker: do not export HAPROXY_MWORKER_REEXEC across programs
This undocumented variable is only for internal use, and its sole presence affects the process' behavior, as shown in bug #1324. It must not be exported to workers, external checks, nor programs. Let's unset it before forking programs and workers. This should be backported as far as 1.8. The worker code might differ a bit before 2.5 due to the recent removal of multi-process support.
This commit is contained in:
parent
26146194d3
commit
3c032f2d4d
@ -3183,6 +3183,8 @@ int main(int argc, char **argv)
|
||||
exit(1); /* there has been an error */
|
||||
}
|
||||
else if (ret == 0) { /* child breaks here */
|
||||
/* This one must not be exported, it's internal! */
|
||||
unsetenv("HAPROXY_MWORKER_REEXEC");
|
||||
ha_random_jump96(1);
|
||||
}
|
||||
else { /* parent here */
|
||||
|
@ -110,6 +110,8 @@ int mworker_ext_launch_all()
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* This one must not be exported, it's internal! */
|
||||
unsetenv("HAPROXY_MWORKER_REEXEC");
|
||||
execvp(child->command[0], child->command);
|
||||
|
||||
ha_alert("Cannot execute %s: %s\n", child->command[0], strerror(errno));
|
||||
|
Loading…
Reference in New Issue
Block a user