Ensure forked processes always are on a controlling tty, so the
^C can be properly sent to /dev/console.
 -Erik
diff --git a/init.c b/init.c
index b532ea8..b3ae97d 100644
--- a/init.c
+++ b/init.c
@@ -411,6 +411,7 @@
 
 	if ((pid = fork()) == 0) {
 		/* Clean up */
+		ioctl(0, TIOCNOTTY, 0);
 		close(0);
 		close(1);
 		close(2);
@@ -430,7 +431,7 @@
 		dup2(fd, 0);
 		dup2(fd, 1);
 		dup2(fd, 2);
-		ioctl(0, TIOCSCTTY, 0);
+		ioctl(0, TIOCSCTTY, 1);
 		tcsetpgrp(0, getpgrp());
 		set_term(0);
 
diff --git a/init/init.c b/init/init.c
index b532ea8..b3ae97d 100644
--- a/init/init.c
+++ b/init/init.c
@@ -411,6 +411,7 @@
 
 	if ((pid = fork()) == 0) {
 		/* Clean up */
+		ioctl(0, TIOCNOTTY, 0);
 		close(0);
 		close(1);
 		close(2);
@@ -430,7 +431,7 @@
 		dup2(fd, 0);
 		dup2(fd, 1);
 		dup2(fd, 2);
-		ioctl(0, TIOCSCTTY, 0);
+		ioctl(0, TIOCSCTTY, 1);
 		tcsetpgrp(0, getpgrp());
 		set_term(0);