]> git.eshelyaron.com Git - emacs.git/commitdiff
* callproc.c (Fcall_process): Don't misreport vfork failure.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 29 Nov 2012 00:36:22 +0000 (16:36 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 29 Nov 2012 00:36:22 +0000 (16:36 -0800)
src/ChangeLog
src/callproc.c

index da15a612a19d59cb697abf1de7f5f1a7f584d48e..b1c3b0025e1887aebf4c8672f55e8764efbc2aad 100644 (file)
@@ -1,3 +1,7 @@
+2012-11-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * callproc.c (Fcall_process): Don't misreport vfork failure.
+
 2012-11-28  Paul Eggert  <eggert@cs.ucla.edu>
 
        * callproc.c (Fcall_process): Fix vfork portability problems.
index bba1c043b4cd81e7d2bb50b2becd7d6ad724b355..167663a45c6a0c592535840ce1a71c42c1593f3a 100644 (file)
@@ -199,6 +199,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS)  */)
 #else
   pid_t pid;
 #endif
+  int vfork_errno;
   int fd_output = -1;
   struct coding_system process_coding; /* coding-system of process output */
   struct coding_system argument_coding;        /* coding-system of arguments */
@@ -627,6 +628,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS)  */)
        child_setup (filefd, fd1, fd_error, new_argv, 0, current_dir);
       }
 
+    vfork_errno = errno;
     unblock_input ();
 
 #endif /* not WINDOWSNT */
@@ -651,6 +653,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS)  */)
     {
       if (fd0 >= 0)
        emacs_close (fd0);
+      errno = vfork_errno;
       report_file_error ("Doing vfork", Qnil);
     }