mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-10 07:49:54 +00:00
MINOR: mworker: display an accurate error when the reexec fail
When the master worker fail the execvp, it returns the wrong error "Cannot allocate memory". We now display the accurate error corresponding to the errno value.
This commit is contained in:
parent
6d889500e2
commit
722d4ca0dd
@ -652,9 +652,11 @@ static void mworker_reload()
|
||||
Warning("Reexecuting Master process\n");
|
||||
execvp(next_argv[0], next_argv);
|
||||
|
||||
Warning("Failed to reexecute the master process [%d]: %s\n", pid, strerror(errno));
|
||||
return;
|
||||
|
||||
alloc_error:
|
||||
Warning("Cannot allocate memory\n");
|
||||
Warning("Failed to reexecute the master processs [%d]\n", pid);
|
||||
Warning("Failed to reexecute the master processs [%d]: Cannot allocate memory\n", pid);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -732,8 +734,6 @@ void reexec_on_failure()
|
||||
|
||||
Warning("Reexecuting Master process in waitpid mode\n");
|
||||
mworker_reload();
|
||||
|
||||
Warning("Failed to reexecute the master processs\n");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user