summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--twrp.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/twrp.cpp b/twrp.cpp
index 24a56f18b..53aab7f66 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -20,6 +20,7 @@
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
+#include <signal.h>
#include "cutils/properties.h"
extern "C" {
@@ -72,6 +73,8 @@ int main(int argc, char **argv) {
freopen(TMP_LOG_FILE, "a", stderr);
setbuf(stderr, NULL);
+ signal(SIGPIPE, SIG_IGN);
+
// Handle ADB sideload
if (argc == 3 && strcmp(argv[1], "--adbd") == 0) {
adb_main(argv[2]);