diff options
| author | Paul Eggert | 2011-07-27 18:46:23 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-07-27 18:46:23 -0700 |
| commit | 5266b4bb6079efcf14e5d4fc633636a65c4b7e80 (patch) | |
| tree | 1b82bb2e0af62a063da0affa88ead972e42be1d7 /src/callproc.c | |
| parent | 044c22e545acef592ed95e4e3bb9f8aeff67291a (diff) | |
| download | emacs-5266b4bb6079efcf14e5d4fc633636a65c4b7e80.tar.gz emacs-5266b4bb6079efcf14e5d4fc633636a65c4b7e80.zip | |
* callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
Diffstat (limited to 'src/callproc.c')
| -rw-r--r-- | src/callproc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/callproc.c b/src/callproc.c index ad3eddbdd39..f148f6233d4 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -603,6 +603,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 603 | 603 | ||
| 604 | /* vfork, and prevent local vars from being clobbered by the vfork. */ | 604 | /* vfork, and prevent local vars from being clobbered by the vfork. */ |
| 605 | { | 605 | { |
| 606 | int volatile fd1_volatile = fd1; | ||
| 606 | int volatile fd_error_volatile = fd_error; | 607 | int volatile fd_error_volatile = fd_error; |
| 607 | int volatile fd_output_volatile = fd_output; | 608 | int volatile fd_output_volatile = fd_output; |
| 608 | int volatile output_to_buffer_volatile = output_to_buffer; | 609 | int volatile output_to_buffer_volatile = output_to_buffer; |
| @@ -610,6 +611,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 610 | 611 | ||
| 611 | pid = vfork (); | 612 | pid = vfork (); |
| 612 | 613 | ||
| 614 | fd1 = fd1_volatile; | ||
| 613 | fd_error = fd_error_volatile; | 615 | fd_error = fd_error_volatile; |
| 614 | fd_output = fd_output_volatile; | 616 | fd_output = fd_output_volatile; |
| 615 | output_to_buffer = output_to_buffer_volatile; | 617 | output_to_buffer = output_to_buffer_volatile; |