]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: init: use the more portable FD_CLOEXEC for /dev/null
authorWilly Tarreau <w@1wt.eu>
Mon, 25 Nov 2024 07:43:25 +0000 (08:43 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Nov 2024 07:46:29 +0000 (08:46 +0100)
commita3613d239b9ce02970851e59089afd4db21091a4
tree3f117f182e772e87edc1b8c4433b846dc40df68b
parentf0548302bb258ff22673e6869888bd029dcebda2
BUILD: init: use the more portable FD_CLOEXEC for /dev/null

In 3.1-dev10, commit 8dd4efe42f ("MAJOR: mworker: move master-worker
fork in init()"), the FD associated to /dev/null was made CLOEXEC
using O_CLOEXEC. Unfortunately this is not portable on older OSes,
doesn't build on Solaris for example, and was even reported as breaking
moderately old Linux OSes for other projects. Better not use it unless
absolutely certain it will work (currently we only use it for Linux
namespaces, which are optional), and use the conventional FD_CLOEXEC
instead.

No backport is needed.
src/haproxy.c