Extend `call-process' to take the `(:file "file")' syntax to redirect
[bpt/emacs.git] / src / sysdep.c
index ca7de4f..9a7045f 100644 (file)
@@ -301,6 +301,19 @@ int wait_debugging EXTERNALLY_VISIBLE;
 
 void
 wait_for_termination (int pid)
+{
+  wait_for_termination_1 (pid, 0);
+}
+
+/* Like the above, but allow keyboard interruption. */
+void
+interruptible_wait_for_termination (int pid)
+{
+  wait_for_termination_1 (pid, 1);
+}
+
+void
+wait_for_termination_1 (int pid, int interruptible)
 {
   while (1)
     {
@@ -339,6 +352,8 @@ wait_for_termination (int pid)
       sigsuspend (&empty_mask);
 #endif /* not WINDOWSNT */
 #endif /* not BSD_SYSTEM, and not HPUX version >= 6 */
+      if (interruptible)
+       QUIT;
     }
 }