[PATCH 1/2] Handle SIGPIPE in req_setup_send

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When IPC client exits exactly when req_setup_send function calls send,
SIGPIPE is generated and corosync (because SIGPIPE is not handled)
exits. Solution is to use MSG_NOSIGNAL as flag.

Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx>
---
 exec/coroipcs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/exec/coroipcs.c b/exec/coroipcs.c
index e97a022..7645499 100644
--- a/exec/coroipcs.c
+++ b/exec/coroipcs.c
@@ -761,7 +761,7 @@ req_setup_send (
 	res_setup.error = error;
 
 retry_send:
-	res = send (conn_info->fd, &res_setup, sizeof (mar_res_setup_t), MSG_WAITALL);
+	res = send (conn_info->fd, &res_setup, sizeof (mar_res_setup_t), MSG_WAITALL|MSG_NOSIGNAL);
 	if (res == -1 && errno == EINTR) {
 		api->stats_increment_value (conn_info->stats_handle, "send_retry_count");
 		goto retry_send;
-- 
1.7.1

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss




[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux