bind: avoid crashes from SIGPIPE

The Go runtime doesn't handle SIGIPE signals from writing to closed
sockets or pipes in c-archive and c-shared mode (issue 17393).
Work around it in gomobile by simply ignoring all SIGPIPE signals;
they're not useful in mobile apps anyway.

Change-Id: Ibd7ee41058856c5eddb4a519345a3851a29e9b44
Reviewed-on: https://go-review.googlesource.com/33771
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Elias Naur
2016-12-01 16:06:28 +00:00
parent aa9922ad4c
commit 72eef9d093
4 changed files with 40 additions and 0 deletions
+4
View File
@@ -577,4 +577,8 @@ public class SeqTest extends InstrumentationTestCase {
InitCaller initer = Testpkg.newInitCaller();
initer.init();
}
public void testSIGPIPE() {
Testpkg.testSIGPIPE();
}
}