aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1994-02-26 05:55:03 +0000
committerKarl Heuer1994-02-26 05:55:03 +0000
commita0932daa92bbf02262926f6b9a4d1828411a29e2 (patch)
tree4da84cb13c1f6b963df88b28330d20a795c8596e /src
parent8026024c1bbe372d3702b53e221db3bdb30f88d8 (diff)
downloademacs-a0932daa92bbf02262926f6b9a4d1828411a29e2.tar.gz
emacs-a0932daa92bbf02262926f6b9a4d1828411a29e2.zip
(sys_subshell): New function, split from sys_suspend.
Diffstat (limited to 'src')
-rw-r--r--src/sysdep.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index fae76185dbf..abd7b4a0523 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -568,10 +568,6 @@ struct save_signal
568 568
569sys_suspend () 569sys_suspend ()
570{ 570{
571#ifdef MSDOS /* Demacs 1.1.2 91/10/20 Manabu Higashida */
572 int st;
573 char oldwd[MAXPATHLEN+1]; /* Fixed length is safe on MSDOS. */
574#endif
575#ifdef VMS 571#ifdef VMS
576 /* "Foster" parentage allows emacs to return to a subprocess that attached 572 /* "Foster" parentage allows emacs to return to a subprocess that attached
577 to the current emacs as a cheaper than starting a whole new process. This 573 to the current emacs as a cheaper than starting a whole new process. This
@@ -630,6 +626,22 @@ sys_suspend ()
630/* On a system where suspending is not implemented, 626/* On a system where suspending is not implemented,
631 instead fork a subshell and let it talk directly to the terminal 627 instead fork a subshell and let it talk directly to the terminal
632 while we wait. */ 628 while we wait. */
629 sys_subshell ();
630
631#endif /* no USG_JOBCTRL */
632#endif /* no SIGTSTP */
633#endif /* not VMS */
634}
635
636/* Fork a subshell. */
637
638sys_subshell ()
639{
640#ifndef VMS
641#ifdef MSDOS /* Demacs 1.1.2 91/10/20 Manabu Higashida */
642 int st;
643 char oldwd[MAXPATHLEN+1]; /* Fixed length is safe on MSDOS. */
644#endif
633 int pid = fork (); 645 int pid = fork ();
634 struct save_signal saved_handlers[5]; 646 struct save_signal saved_handlers[5];
635 647
@@ -710,10 +722,7 @@ sys_suspend ()
710 synch_process_alive = 1; 722 synch_process_alive = 1;
711 wait_for_termination (pid); 723 wait_for_termination (pid);
712 restore_signal_handlers (saved_handlers); 724 restore_signal_handlers (saved_handlers);
713 725#endif /* !VMS */
714#endif /* no USG_JOBCTRL */
715#endif /* no SIGTSTP */
716#endif /* not VMS */
717} 726}
718 727
719save_signal_handlers (saved_handlers) 728save_signal_handlers (saved_handlers)