mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-08 16:23:24 -04:00
MINOR: mworker: set the master side of ipc_fd in the worker to -1
Once the child->ipc_fd[0] is closed in the worker, set the value to -1 so we don't reference a closed FD anymore.
This commit is contained in:
parent
55a921c914
commit
7e01878e45
1 changed files with 3 additions and 1 deletions
|
|
@ -3302,8 +3302,10 @@ int main(int argc, char **argv)
|
|||
* workers, we don't need to close the worker
|
||||
* side of other workers since it's done with
|
||||
* the bind_proc */
|
||||
if (child->ipc_fd[0] >= 0)
|
||||
if (child->ipc_fd[0] >= 0) {
|
||||
close(child->ipc_fd[0]);
|
||||
child->ipc_fd[0] = -1;
|
||||
}
|
||||
if (child->options & PROC_O_TYPE_WORKER &&
|
||||
child->reloads == 0) {
|
||||
/* keep this struct if this is our pid */
|
||||
|
|
|
|||
Loading…
Reference in a new issue