
From: Jeff Dike <jdike@addtoit.com>

Due to me not refreshing this patch earlier, the last reboot signals patch was
missing the actual fix.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/um/kernel/main.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+)

diff -puN arch/um/kernel/main.c~uml-finish-the-signals-across-a-reboot-fix arch/um/kernel/main.c
--- 25/arch/um/kernel/main.c~uml-finish-the-signals-across-a-reboot-fix	Tue Sep 14 17:08:42 2004
+++ 25-akpm/arch/um/kernel/main.c	Tue Sep 14 17:08:42 2004
@@ -147,7 +147,21 @@ int main(int argc, char **argv, char **e
 
 	/* Reboot */
 	if(ret){
+		int err;
+
 		printf("\n");
+
+		/* Let any pending signals fire, then disable them.  This
+		 * ensures that they won't be delivered after the exec, when
+		 * they are definitely not expected.
+		 */
+		unblock_signals();
+		disable_timer();
+		err = deactivate_all_fds();
+		if(err)
+			printf("deactivate_all_fds failed, errno = %d\n",
+			       -err);
+
 		execvp(new_argv[0], new_argv);
 		perror("Failed to exec kernel");
 		ret = 1;
_
