OSDN Git Service

libdvm should block SIGPIPE like the RI does.
authorElliott Hughes <enh@google.com>
Wed, 21 Aug 2013 20:10:37 +0000 (13:10 -0700)
committerElliott Hughes <enh@google.com>
Wed, 21 Aug 2013 20:10:37 +0000 (13:10 -0700)
Normally AndroidRuntime.cpp patches over this lapse, but that means
that tests run by vogar or any other kind of "bare" VM doesn't handle
SIGPIPE correctly. I'll remove the workaround from AndroidRuntime.cpp.

Bug: 10211309
Change-Id: I51380486867af011d58ddbefbdef8d120f736ad9

vm/Init.cpp

index 9c4ee48..2c81f67 100644 (file)
@@ -1339,7 +1339,7 @@ static void blockSignals()
 #if defined(WITH_JIT) && defined(WITH_JIT_TUNING)
     sigaddset(&mask, SIGUSR2);      // used to investigate JIT internals
 #endif
-    //sigaddset(&mask, SIGPIPE);
+    sigaddset(&mask, SIGPIPE);
     cc = sigprocmask(SIG_BLOCK, &mask, NULL);
     assert(cc == 0);