From: Hwankyu Jhun Date: Mon, 26 Nov 2018 06:33:06 +0000 (+0900) Subject: Handle EPIPE error X-Git-Tag: submit/tizen/20181126.051432~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=79ab22a87c9043f5b9747f55d9d0c91c8d294c0b;p=platform%2Fcore%2Fappfw%2Frpc-port.git Handle EPIPE error The Write() Method uses send() with MSG_NOSIGNAL instead of write(). Change-Id: I20251df65375dacdc42f9a4da1d531dd3e635728 Signed-off-by: Hwankyu Jhun --- diff --git a/src/port-internal.cc b/src/port-internal.cc index 2cd3a72..34557b6 100644 --- a/src/port-internal.cc +++ b/src/port-internal.cc @@ -134,7 +134,7 @@ int Port::Write(const void* buf, unsigned int size) { } while (left) { - nb = write(fd_, buffer, left); + nb = send(fd_, buffer, left, MSG_NOSIGNAL); if (nb == -1) { if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) { LOGE("write_socket: %d errno, sleep and retry ...", errno);