diff options
author | Mathias Agopian <mathias@google.com> | 2012-02-06 19:10:04 -0800 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2012-02-06 19:17:56 -0800 |
commit | 99fe3c6d3dcb6fb26bf283343f946d031b052dff (patch) | |
tree | 02b72dbca16644978308e2eb2b86f79b8ebc08df /libs/gui | |
parent | 59015b369ddb4a60587d546d39d2511b2812b60f (diff) | |
download | frameworks_native-99fe3c6d3dcb6fb26bf283343f946d031b052dff.zip frameworks_native-99fe3c6d3dcb6fb26bf283343f946d031b052dff.tar.gz frameworks_native-99fe3c6d3dcb6fb26bf283343f946d031b052dff.tar.bz2 |
make sure to ignore SIGPIPE in the write side of BitTube
Change-Id: If4f037f4403d3ecbcd5f91248354765fc0fa13cb
Diffstat (limited to 'libs/gui')
-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)); |