From: Willy Tarreau Date: Fri, 30 Aug 2019 12:36:10 +0000 (+0200) Subject: MINOR: fd: add a new "initialized" bit in the fdtab struct X-Git-Tag: v2.1-dev2~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d660990cee7227fb052047ac3925af5950dfc62d;p=thirdparty%2Fhaproxy.git MINOR: fd: add a new "initialized" bit in the fdtab struct The purpose is to be able to remember that initialization was already done for a file descriptor. This will allow to get rid of some dirty hacks performed in the logs or fd sinks where the init state of the fd has to be guessed. --- diff --git a/include/types/fd.h b/include/types/fd.h index 35d3bc2376..b96abc09d6 100644 --- a/include/types/fd.h +++ b/include/types/fd.h @@ -127,6 +127,7 @@ struct fdtab { unsigned char ev; /* event seen in return of poll() : FD_POLL_* */ unsigned char linger_risk:1; /* 1 if we must kill lingering before closing */ unsigned char cloned:1; /* 1 if a cloned socket, requires EPOLL_CTL_DEL on close */ + unsigned char initialized:1; /* 1 if init phase was done on this fd (e.g. set non-blocking) */ } #ifdef USE_THREAD /* only align on cache lines when using threads; 32-bit small archs