]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: listeners: CLOEXEC flag is not correctly set
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 27 Nov 2018 11:02:39 +0000 (12:02 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 27 Nov 2018 18:34:00 +0000 (19:34 +0100)
commitd913800a7d680fdd7e7864463d5fa936b9d58fa8
treef80a30221ec86b1f0cd76626ac659fe830715554
parent4b58c80ee20eb8b460f65d6e8b7b73f037df7766
BUG/MEDIUM: listeners: CLOEXEC flag is not correctly set

The CLOEXEC flag was set using a F_SETFL which can't work.
To set the CLOEXEC flag F_SETFD should be used, the problem is that it
needs a new call to fcntl() and it's on the path of every accept.

This flag was only needed in the case of the master, so the patch was
reverted and the flag set only in this case.

The bug was introduced by 0b3e849 ("MEDIUM: listeners: set O_CLOEXEC on
the accepted FDs").

No backport needed.
src/listener.c