changeset 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 4d86978056b1
children a4a9a0d9b53a
files src/process.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
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;