diff options
author | Mathias Agopian <mathias@google.com> | 2012-02-06 19:18:57 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-02-06 19:18:57 -0800 |
commit | f0533365dc1c89253a551a77fbc987568bb8e650 (patch) | |
tree | a56622d8eaacfe3ef2958e410c301c3cbf153a86 | |
parent | 0c34c14a17af0e90086f674f6a4d510673e250c8 (diff) | |
parent | efa08a6c2190afb6214a4c6a75a14700def5a43e (diff) | |
download | frameworks_base-f0533365dc1c89253a551a77fbc987568bb8e650.zip frameworks_base-f0533365dc1c89253a551a77fbc987568bb8e650.tar.gz frameworks_base-f0533365dc1c89253a551a77fbc987568bb8e650.tar.bz2 |
Merge "make sure to ignore SIGPIPE in the write side of BitTube"
-rw-r--r-- | libs/gui/BitTube.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/gui/BitTube.cpp b/libs/gui/BitTube.cpp index 785da39..55f4178 100644 --- a/libs/gui/BitTube.cpp +++ b/libs/gui/BitTube.cpp @@ -17,8 +17,9 @@ #include <stdint.h> #include <sys/types.h> -#include <unistd.h> #include <fcntl.h> +#include <signal.h> +#include <unistd.h> #include <utils/Errors.h> @@ -38,6 +39,8 @@ BitTube::BitTube() mSendFd = fds[1]; fcntl(mReceiveFd, F_SETFL, O_NONBLOCK); fcntl(mSendFd, F_SETFL, O_NONBLOCK); + // ignore SIGPIPE, we handle write errors through EPIPE instead + signal(SIGPIPE, SIG_IGN); } else { mReceiveFd = -errno; ALOGE("BitTube: pipe creation failed (%s)", strerror(-mReceiveFd)); |