Patch from Dan Langlois <dan@somanetworks.com> Support SIGSTOP/SIGCONT
for wierd situations when people want init to actualy stop doing
anything for a while...
diff --git a/init/init.c b/init/init.c
index 8e23683..d0beb2a 100644
--- a/init/init.c
+++ b/init/init.c
@@ -181,6 +181,7 @@
 static int  kernelVersion  = 0;
 static char termType[32]   = "TERM=linux";
 static char console[32]    = _PATH_CONSOLE;
+sig_atomic_t got_cont = 0;
 
 static void delete_initAction(initAction * action);
 
@@ -473,6 +474,9 @@
 		signal(SIGINT, SIG_DFL);
 		signal(SIGTERM, SIG_DFL);
 		signal(SIGHUP, SIG_DFL);
+		signal(SIGCONT, SIG_DFL);
+		signal(SIGSTOP, SIG_DFL);
+		signal(SIGTSTP, SIG_DFL);
 
 		if ((fd = device_open(terminal, O_RDWR)) < 0) {
 			if (stat(terminal, &sb) != 0) {
@@ -652,6 +656,9 @@
 	sigaddset(&block_signals, SIGUSR2);
 	sigaddset(&block_signals, SIGINT);
 	sigaddset(&block_signals, SIGTERM);
+	sigaddset(&block_signals, SIGCONT);
+	sigaddset(&block_signals, SIGSTOP);
+	sigaddset(&block_signals, SIGTSTP);
 	sigprocmask(SIG_BLOCK, &block_signals, NULL);
 
 	/* Allow Ctrl-Alt-Del to reboot system. */
@@ -726,6 +733,27 @@
 	run_actions(CTRLALTDEL);
 }
 
+/*
+ *	The SIGSTOP & SIGTSTP handler
+ */
+static void stop_handler(int sig)
+{
+	int	saved_errno = errno;
+
+	got_cont = 0;
+	while(!got_cont) pause();
+	got_cont = 0;
+	errno = saved_errno;
+}
+
+/*
+ *  The SIGCONT handler
+ */ 
+static void cont_handler(int sig)
+{
+	got_cont = 1;
+}
+
 #endif							/* ! DEBUG_INIT */
 
 static void new_initAction(initActionEnum action, char *process, char *cons)
@@ -925,6 +953,9 @@
 	signal(SIGUSR2, halt_signal);
 	signal(SIGINT, ctrlaltdel_signal);
 	signal(SIGTERM, reboot_signal);
+	signal(SIGCONT, cont_handler);
+	signal(SIGSTOP, stop_handler);
+	signal(SIGTSTP, stop_handler);
 
 	/* Turn off rebooting via CTL-ALT-DEL -- we get a 
 	 * SIGINT on CAD so we can shut things down gracefully... */