From: Abhishek Sansanwal Date: Mon, 10 Apr 2017 06:06:39 +0000 (+0530) Subject: Correct usage of send() system call X-Git-Tag: submit/tizen/20170411.091632~1^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fconnectivity%2Fnet-config.git;a=commitdiff_plain;h=c8dff043234df7613730178717242adc3eea17e8 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 --- 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) {