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 35d3bc2..b96abc0 100644
--- a/include/types/fd.h
+++ b/include/types/fd.h
@@ -127,6 +127,7 @@
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