mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-06 21:50:17 +00:00
Revert "MINOR: mworker: sets used or closed worker FDs to -1"
This reverts commit ea7371e934
.
This can't work correctly as we need this FD in the worker to be
inserted in the fdtab. The correct way to do it would be to cleanup the
mworker_proc in the master after the fork().
This commit is contained in:
parent
7fbb94da8d
commit
ce672844dd
@ -2982,19 +2982,11 @@ int mworker_cli_sockpair_new(struct mworker_proc *mworker_proc, int proc)
|
|||||||
global.maxsock++; /* for the listening socket */
|
global.maxsock++; /* for the listening socket */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* the sockpair was asssigned successfully to the listener for the
|
|
||||||
* worker, we can remove it from the mworker_proc, so it's not used
|
|
||||||
* elsewhere accidentally
|
|
||||||
*/
|
|
||||||
mworker_proc->ipc_fd[1] = -1;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
close(mworker_proc->ipc_fd[0]);
|
close(mworker_proc->ipc_fd[0]);
|
||||||
close(mworker_proc->ipc_fd[1]);
|
close(mworker_proc->ipc_fd[1]);
|
||||||
mworker_proc->ipc_fd[0] = -1;
|
|
||||||
mworker_proc->ipc_fd[1] = -1;
|
|
||||||
free(err);
|
free(err);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user