* [Cluster-devel] [PATCH] cman: Prevent libcman from causing SIGPIPE
@ 2012-12-17 9:23 Christine Caulfield
2012-12-17 10:12 ` Fabio M. Di Nitto
0 siblings, 1 reply; 2+ messages in thread
From: Christine Caulfield @ 2012-12-17 9:23 UTC (permalink / raw)
To: cluster-devel.redhat.com
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.
Signed-Off-By: Christine Caulfield <ccaulfie@redhat.com>
-------------- 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>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Cluster-devel] [PATCH] cman: Prevent libcman from causing SIGPIPE
2012-12-17 9:23 [Cluster-devel] [PATCH] cman: Prevent libcman from causing SIGPIPE Christine Caulfield
@ 2012-12-17 10:12 ` Fabio M. Di Nitto
0 siblings, 0 replies; 2+ messages in thread
From: Fabio M. Di Nitto @ 2012-12-17 10:12 UTC (permalink / raw)
To: cluster-devel.redhat.com
ACK
On 12/17/2012 10:23 AM, Christine Caulfield wrote:
> 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.
>
> Signed-Off-By: Christine Caulfield <ccaulfie@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-17 10:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-17 9:23 [Cluster-devel] [PATCH] cman: Prevent libcman from causing SIGPIPE Christine Caulfield
2012-12-17 10:12 ` Fabio M. Di Nitto
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.