Skip to contentSkip to conversation

UML - finish the signals across a reboot fix

PATCH New Jeff Dike 1 participant 1 message Sep 14, 2004 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 1/1 UML - finish the signals across a reboot fix

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

arch/um/kernel/main.c +14 -0
Index: 2.6.9-rc2/arch/um/kernel/main.c
===================================================================
@@ -149,7 +149,21 @@
 
 	/* 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;