redis Introduce socket shutdown into connection type, used if a fork is active (#11376)

Date: Fri Nov 4 18
Author: Binbin binloveplay1314@qq.com

Introduce socket shutdown into connection type, used if a fork is active (#11376) Introduce socket shutdown() into connection type, and use it on normal socket if a fork is active. This allows us to close client connections when there are child processes sharing the file descriptors. Fixes #10077. The reason is that since the fork() child is holding the file descriptors, the close in unlinkClient -> connClose isn’t sufficient. The client will not realize that the connection is disconnected until the child process ends. Let’s try to be conservative and only use shutdown when the fork is active.