From 483cfdabaf6ab282987a0a21d6177c3daa95dc12 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 3 May 2015 20:18:53 -0500 Subject: Replace android-specific hack with just signal(SIGPIPE, SIG_IGN). --- main.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 2fd22d4b..c557030d 100644 --- a/main.c +++ b/main.c @@ -183,16 +183,10 @@ void toybox_main(void) xputc('\n'); } -static void shutup_sigpipe(int i) -{ - // exit success from sigpipe to mollify overzealous crash reporting. - _exit(0); -} - int main(int argc, char *argv[]) { - if (CFG_TOYBOX_ON_ANDROID) signal(SIGPIPE, shutup_sigpipe); - else signal(SIGPIPE, SIG_IGN); + // We check our own stdout errors, disable sigpipe killer + signal(SIGPIPE, SIG_IGN); if (CFG_TOYBOX) { // Trim path off of command name -- cgit v1.2.3