VDSUSP fix from 1.0 tree


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@931 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
diff --git a/nano.c b/nano.c
index 3c403db..74adc87 100644
--- a/nano.c
+++ b/nano.c
@@ -1937,6 +1937,9 @@
 	SIGTSTP handler */
 
     doupdate();
+    /* The Hurd seems to need this, otherwise a ^Y after a ^Z will
+	start suspending again */
+   signal_init();
 }
 
 void handle_sigwinch(int s)
@@ -2033,18 +2036,25 @@
     act.sa_handler = handle_sigwinch;
     sigaction(SIGWINCH, &act, NULL);
 
+
+#ifdef _POSIX_VDISABLE
+    tcgetattr(0, &term);
+
+#ifdef VDSUSP
+    term.c_cc[VDSUSP] = _POSIX_VDISABLE;
+#endif /* VDSUSP */
+
+#endif /* _POSIX_VDISABLE */
+
     if (!ISSET(SUSPEND)) {
 
 /* Insane! */
 #ifdef _POSIX_VDISABLE
-	tcgetattr(0, &term);
 	term.c_cc[VSUSP] = _POSIX_VDISABLE;
-	tcsetattr(0, TCSANOW, &term);
-#endif
-
-	/* The HURD seems to need this anyway! */
+#else
 	act.sa_handler = SIG_IGN;
 	sigaction(SIGTSTP, &act, NULL);
+#endif
 
     } else {
 	/* if we don't do this, it seems other stuff interrupts the
@@ -2058,6 +2068,12 @@
 	sigaction(SIGCONT, &act, NULL);
     }
 
+
+#ifdef _POSIX_VDISABLE
+    tcsetattr(0, TCSANOW, &term);
+#endif
+
+
 }
 
 void window_init(void)