diff options
author | Selim Gurun <sgurun@google.com> | 2012-03-12 10:20:42 -0700 |
---|---|---|
committer | Selim Gurun <sgurun@google.com> | 2012-03-12 10:20:42 -0700 |
commit | 6ac770fc52595b8230c3286d7707c85b003aeac1 (patch) | |
tree | b9ef2bdec2ce15b6131b9849f8a46dff60a8b117 /libsysutils | |
parent | 63d84d049a4673517b389188366ef61f840e9c2d (diff) | |
download | system_core-6ac770fc52595b8230c3286d7707c85b003aeac1.zip system_core-6ac770fc52595b8230c3286d7707c85b003aeac1.tar.gz system_core-6ac770fc52595b8230c3286d7707c85b003aeac1.tar.bz2 |
Do not generate SIGPIPE errors in SocketCLient.
This change is to make sure the users of library does not crash
if they are not handling SIGPIPE properly.
Change-Id: I4ea80d6bfc26a4bca6b901959ae3060b059d46d3
Diffstat (limited to 'libsysutils')
-rw-r--r-- | libsysutils/src/SocketClient.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libsysutils/src/SocketClient.cpp b/libsysutils/src/SocketClient.cpp index 4a7c82d..1533120 100644 --- a/libsysutils/src/SocketClient.cpp +++ b/libsysutils/src/SocketClient.cpp @@ -140,7 +140,7 @@ int SocketClient::sendDataLocked(const void *data, int len) { } while (brtw > 0) { - rc = write(mSocket, p, brtw); + rc = send(mSocket, p, brtw, MSG_NOSIGNAL); if (rc > 0) { p += rc; brtw -= rc; |