Loading
sock/posix: Add MSG_NOSIGNAL to prevent SIGPIPE for a socket that may be closed
We try avoiding write a closed socket by checking if the return value of recv() is zero. However it is not possible to completely avoid writing a socket which is already closed by the target. Repeatedly adding/removing listener in the NVMe-oF TCP target caused SIGPIPE to the NVMe-oF initiator. Fix the issue by adding MSG_NOSIGINAL to the flag of sendmsg(). Signed-off-by:Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I273679c91c4b867792e966b1dc2121f6d2188f16 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12119 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Reviewed-by:
Aleksey Marchuk <alexeymar@mellanox.com>