mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-05-08 18:57:59 +00:00
MINOR: rename master process name in -Ds (systemd mode)
To avoid confusion between the master process and child processes, the master process is renamed after the forks.
This commit is contained in:
parent
d3842523ff
commit
6ad6bde9e1
@ -1870,7 +1870,14 @@ int main(int argc, char **argv)
|
||||
|
||||
if (proc == global.nbproc) {
|
||||
if (global.mode & MODE_SYSTEMD) {
|
||||
int i;
|
||||
|
||||
protocol_unbind_all();
|
||||
for (i = 1; i < argc; i++) {
|
||||
memset(argv[i], '\0', strlen(argv[i]));
|
||||
}
|
||||
/* it's OK because "-Ds -f x" is the shortest form going here */
|
||||
memcpy(argv[0] + strlen(argv[0]), "-master", 8);
|
||||
for (proc = 0; proc < global.nbproc; proc++)
|
||||
while (waitpid(children[proc], NULL, 0) == -1 && errno == EINTR);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user