]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: listener: support inheriting a listening fd from the parent
authorWilly Tarreau <w@1wt.eu>
Sun, 10 Mar 2013 22:51:38 +0000 (23:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 Mar 2013 00:30:01 +0000 (01:30 +0100)
commit40aa070c51648606b89fe65408de797827e3d092
treefbab65f063a9d08f12c42a4f917eed6543325f6d
parent24709286fed4b5154cd620d5bc7e767a950f0a3c
MAJOR: listener: support inheriting a listening fd from the parent

Using the address syntax "fd@<num>", a listener may inherit a file
descriptor that the caller process has already bound and passed as
this number. The fd's socket family is detected using getsockname(),
and the usual initialization is performed through the existing code
for that family, but the socket creation is skipped.

Whether the parent has performed the listen() call or not is not
important as this is detected.

For UNIX sockets, we immediately clear the path after preparing a
socket so that we never remove it in case an abort would happen due
to a late error during startup.
doc/configuration.txt
src/cfgparse.c
src/proto_tcp.c
src/proto_uxst.c
src/standard.c