From c8dff043234df7613730178717242adc3eea17e8 Mon Sep 17 00:00:00 2001 From: Abhishek Sansanwal Date: Mon, 10 Apr 2017 11:36:39 +0530 Subject: [PATCH] Correct usage of send() system call Description: Correct usage of send() system call, using MSG_NOSIGNAL flag to handle SIGPIPE properly Signed-off-by: Abhishek Sansanwal Change-Id: Idb894e5b11a0a24228e8c55a121e3678fad6d90d --- src/utils/network-accessibility.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/network-accessibility.c b/src/utils/network-accessibility.c index 7690ecc..df1312c 100755 --- a/src/utils/network-accessibility.c +++ b/src/utils/network-accessibility.c @@ -291,7 +291,7 @@ static gboolean __send_data_event(GIOChannel *channel, if (net_params->header_done == TRUE) return FALSE; - n = send(fd, request_data, strlen(request_data), 0); + n = send(fd, request_data, strlen(request_data), MSG_NOSIGNAL); DBG("Sent %d bytes", n); if (n < 0) { -- 2.7.4