aboutsummaryrefslogtreecommitdiffstats
path: root/src/callproc.c
diff options
context:
space:
mode:
authorPaul Eggert2012-11-28 16:36:22 -0800
committerPaul Eggert2012-11-28 16:36:22 -0800
commit4a9204fe04dee76dd067aaf1b078a777d1bb1a91 (patch)
treed95b0e04ce14b5fc022bd946bb5c7f4d331574b0 /src/callproc.c
parent60aeceb8c41fffee197d43e7eae2b46d9e3fcc74 (diff)
downloademacs-4a9204fe04dee76dd067aaf1b078a777d1bb1a91.tar.gz
emacs-4a9204fe04dee76dd067aaf1b078a777d1bb1a91.zip
* callproc.c (Fcall_process): Don't misreport vfork failure.
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/callproc.c b/src/callproc.c
index bba1c043b4c..167663a45c6 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -199,6 +199,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
199#else 199#else
200 pid_t pid; 200 pid_t pid;
201#endif 201#endif
202 int vfork_errno;
202 int fd_output = -1; 203 int fd_output = -1;
203 struct coding_system process_coding; /* coding-system of process output */ 204 struct coding_system process_coding; /* coding-system of process output */
204 struct coding_system argument_coding; /* coding-system of arguments */ 205 struct coding_system argument_coding; /* coding-system of arguments */
@@ -627,6 +628,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
627 child_setup (filefd, fd1, fd_error, new_argv, 0, current_dir); 628 child_setup (filefd, fd1, fd_error, new_argv, 0, current_dir);
628 } 629 }
629 630
631 vfork_errno = errno;
630 unblock_input (); 632 unblock_input ();
631 633
632#endif /* not WINDOWSNT */ 634#endif /* not WINDOWSNT */
@@ -651,6 +653,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
651 { 653 {
652 if (fd0 >= 0) 654 if (fd0 >= 0)
653 emacs_close (fd0); 655 emacs_close (fd0);
656 errno = vfork_errno;
654 report_file_error ("Doing vfork", Qnil); 657 report_file_error ("Doing vfork", Qnil);
655 } 658 }
656 659