Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7efd589f authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

am f0533365: Merge "make sure to ignore SIGPIPE in the write side of BitTube"

* commit 'f0533365dc1c89253a551a77fbc987568bb8e650':
  make sure to ignore SIGPIPE in the write side of BitTube
parents 02afb6f5 61925848
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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));