cman: Prevent libcman from causing SIGPIPE
PATCH 1/1 cman: Prevent libcman from causing SIGPIPE
If corosync goes down/is shut down cman will return 0 from cman_dispatch and close the socket. However, if a cman write operation is issued before this happens then SIGPIPE can result from the writev() call to an open, but disconnected, FD.
This patch changes writev() to sendmg() so it can pass MSG_NOSIGNAL to the system call and prevent SIGPIPEs from occurring.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cman_sigpipe.patch
Type: text/x-patch
Size: 579 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20121217/93b59fd5/attachment.bin>
PATCH 1/1 cman: Prevent libcman from causing SIGPIPE
ACK
Quoted 9 lines · Christine Caulfield
If corosync goes down/is shut down cman will return 0 from
cman_dispatchand close the socket. However, if a cman write operation is issued before this happens then SIGPIPE can result from thewritev()call to an open, but disconnected, FD.This patch changes
writev()tosendmg()so it can passMSG_NOSIGNALto the system call and prevent SIGPIPEs from occurring.Signed-off-by Christine Caulfield <[email protected]>