[PATCH 4/4] UML - Fix a crash under screen

From: Jeff Dike
Date: Mon Aug 15 2005 - 18:32:14 EST


Running UML inside a detached screen delivers SIGWINCH when UML is not
expecting it. This patch ignores them.

Signed-off-by: Jeff Dike <jdike@xxxxxxxxxxx>

Index: linux-2.6.13-rc6/arch/um/kernel/skas/process.c
===================================================================
--- linux-2.6.13-rc6.orig/arch/um/kernel/skas/process.c 2005-08-13 09:02:43.000000000 -0400
+++ linux-2.6.13-rc6/arch/um/kernel/skas/process.c 2005-08-13 09:03:15.000000000 -0400
@@ -61,7 +61,11 @@

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)){

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/