[PATCH] uml: fix a crash under screen
authorJeff Dike <jdike@addtoit.com>
Thu, 18 Aug 2005 18:24:25 +0000 (11:24 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 18 Aug 2005 19:53:58 +0000 (12:53 -0700)
Running UML inside a detached screen delivers SIGWINCH when UML is not
expecting it.  This patch ignores them.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/kernel/skas/process.c

index 6dd9e5b..f228f8b 100644 (file)
@@ -61,7 +61,11 @@ void wait_stub_done(int pid, int sig, char * fname)
 
                 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
         } while((n >= 0) && WIFSTOPPED(status) &&
-                (WSTOPSIG(status) == SIGVTALRM));
+                ((WSTOPSIG(status) == SIGVTALRM) ||
+                /* running UML inside a detached screen can cause
+                 * SIGWINCHes
+                 */
+                (WSTOPSIG(status) == SIGWINCH)));
 
         if((n < 0) || !WIFSTOPPED(status) ||
            (WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status) != SIGTRAP)){