diff src/process.c @ 7157:3f4fc9d682b4

(create_process): If vfork fails, close forkin and forkout.
author Richard M. Stallman <rms@gnu.org>
date Thu, 28 Apr 1994 04:35:39 +0000
parents d35b11eed89f
children a33eb16cab9d
line wrap: on
line diff
--- a/src/process.c	Thu Apr 28 04:29:45 1994 +0000
+++ b/src/process.c	Thu Apr 28 04:35:39 1994 +0000
@@ -1396,7 +1396,13 @@
   }
 
   if (pid < 0)
-    report_file_error ("Doing vfork", Qnil);
+    {
+      if (forkin >= 0)
+	close (forkin);
+      if (forkin != forkout && forkout >= 0)
+	close (forkout);
+      report_file_error ("Doing vfork", Qnil);
+    }
   
   XFASTINT (XPROCESS (process)->pid) = pid;