um: Missing pipe handling
authorAnton Ivanov <antivano@cisco.com>
Fri, 7 Mar 2014 18:37:46 +0000 (18:37 +0000)
committerRichard Weinberger <richard@nod.at>
Sun, 20 Apr 2014 21:13:30 +0000 (23:13 +0200)
UML does not handle sigpipe. As a result when running it under
expect or redirecting the IO from the console to an external program
it will crash if the program stops or exits.

Signed-off-by: Anton Ivanov <antivano@cisco.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/os-Linux/main.c

index e1704ff600ff9e677a98a4711d5c8b7b2ff8cf6a..df9191acd926cfb3b5a0c3582549105ac0729d5a 100644 (file)
@@ -151,6 +151,7 @@ int __init main(int argc, char **argv, char **envp)
 #endif
 
        do_uml_initcalls();
+       change_sig(SIGPIPE, 0);
        ret = linux_main(argc, argv);
 
        /*