Commit 4a9204fe authored by Paul Eggert's avatar Paul Eggert
Browse files

* callproc.c (Fcall_process): Don't misreport vfork failure.

parent 60aeceb8
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> 2012-11-28 Paul Eggert <eggert@cs.ucla.edu>
   
* callproc.c (Fcall_process): Fix vfork portability problems. * callproc.c (Fcall_process): Fix vfork portability problems.
......
...@@ -199,6 +199,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) ...@@ -199,6 +199,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
#else #else
pid_t pid; pid_t pid;
#endif #endif
int vfork_errno;
int fd_output = -1; int fd_output = -1;
struct coding_system process_coding; /* coding-system of process output */ struct coding_system process_coding; /* coding-system of process output */
struct coding_system argument_coding; /* coding-system of arguments */ struct coding_system argument_coding; /* coding-system of arguments */
...@@ -627,6 +628,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) ...@@ -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); child_setup (filefd, fd1, fd_error, new_argv, 0, current_dir);
} }
vfork_errno = errno;
unblock_input (); unblock_input ();
#endif /* not WINDOWSNT */ #endif /* not WINDOWSNT */
...@@ -651,6 +653,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) ...@@ -651,6 +653,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
{ {
if (fd0 >= 0) if (fd0 >= 0)
emacs_close (fd0); emacs_close (fd0);
errno = vfork_errno;
report_file_error ("Doing vfork", Qnil); report_file_error ("Doing vfork", Qnil);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment