Skip to contentSkip to conversation

cman: Prevent libcman from causing SIGPIPE

PATCH New Christine Caulfield 2 participants 2 messages Dec 17, 2012

lore
Share & tools
lore
#0 lore raw

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>

#1 lore raw

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_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.