]> git.eshelyaron.com Git - emacs.git/commitdiff
* callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 28 Jul 2011 01:46:23 +0000 (18:46 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 28 Jul 2011 01:46:23 +0000 (18:46 -0700)
src/ChangeLog
src/callproc.c

index 10f6e32689142e59538e9d22162f6baea6c1ce0f..2625c6f9aad6842b6a01f84645873fc1fe128466 100644 (file)
@@ -1,3 +1,7 @@
+2011-07-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
+
 2011-07-28  Paul Eggert  <eggert@cs.ucla.edu>
 
        Integer signedness and overflow and related fixes.  (Bug#9079)
index ad3eddbdd397b42f73c0ba8fdbcdd6885e90f262..f148f6233d49b7762c6233ec42599878e9b7084b 100644 (file)
@@ -603,6 +603,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS)  */)
 
     /* vfork, and prevent local vars from being clobbered by the vfork.  */
     {
+      int volatile fd1_volatile = fd1;
       int volatile fd_error_volatile = fd_error;
       int volatile fd_output_volatile = fd_output;
       int volatile output_to_buffer_volatile = output_to_buffer;
@@ -610,6 +611,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS)  */)
 
       pid = vfork ();
 
+      fd1 = fd1_volatile;
       fd_error = fd_error_volatile;
       fd_output = fd_output_volatile;
       output_to_buffer = output_to_buffer_volatile;