changeset 6102:a92ee78acd12

(sys_subshell): New function, split from sys_suspend.
author Karl Heuer <kwzh@gnu.org>
date Sat, 26 Feb 1994 05:55:03 +0000
parents 9b32ddce536b
children 4acb066b1b96
files src/sysdep.c
diffstat 1 files changed, 17 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/sysdep.c	Sat Feb 26 05:54:26 1994 +0000
+++ b/src/sysdep.c	Sat Feb 26 05:55:03 1994 +0000
@@ -568,10 +568,6 @@
 
 sys_suspend ()
 {
-#ifdef MSDOS	/* Demacs 1.1.2 91/10/20 Manabu Higashida */
-  int st;
-  char oldwd[MAXPATHLEN+1]; /* Fixed length is safe on MSDOS.  */
-#endif
 #ifdef VMS
   /* "Foster" parentage allows emacs to return to a subprocess that attached
      to the current emacs as a cheaper than starting a whole new process.  This
@@ -630,6 +626,22 @@
 /* On a system where suspending is not implemented,
    instead fork a subshell and let it talk directly to the terminal
    while we wait.  */
+  sys_subshell ();
+
+#endif /* no USG_JOBCTRL */
+#endif /* no SIGTSTP */
+#endif /* not VMS */
+}
+
+/* Fork a subshell.  */
+
+sys_subshell ()
+{
+#ifndef VMS
+#ifdef MSDOS	/* Demacs 1.1.2 91/10/20 Manabu Higashida */
+  int st;
+  char oldwd[MAXPATHLEN+1]; /* Fixed length is safe on MSDOS.  */
+#endif
   int pid = fork ();
   struct save_signal saved_handlers[5];
 
@@ -710,10 +722,7 @@
   synch_process_alive = 1;
   wait_for_termination (pid);
   restore_signal_handlers (saved_handlers);
-
-#endif /* no USG_JOBCTRL */
-#endif /* no SIGTSTP */
-#endif /* not VMS */
+#endif /* !VMS */
 }
 
 save_signal_handlers (saved_handlers)