Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
db6c0e74
Commit
db6c0e74
authored
May 02, 2011
by
Paul Eggert
Browse files
* callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
parent
dd5963ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
src/ChangeLog
src/ChangeLog
+2
-0
src/callproc.c
src/callproc.c
+13
-4
No files found.
src/ChangeLog
View file @
db6c0e74
2011-05-03 Paul Eggert <eggert@cs.ucla.edu>
* callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
* process.c (Fformat_network_address): Fix typo: args2 -> *args2.
* xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
...
...
src/callproc.c
View file @
db6c0e74
...
...
@@ -192,7 +192,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
int
count
=
SPECPDL_INDEX
();
volatile
USE_SAFE_ALLOCA
;
const
unsigned
char
**
volatile
new_argv_volatile
;
register
const
unsigned
char
**
new_argv
;
/* File to use for stderr in the child.
t means use same as standard output. */
...
...
@@ -415,7 +414,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
SAFE_ALLOCA
(
new_argv
,
const
unsigned
char
**
,
(
nargs
>
4
?
nargs
-
2
:
2
)
*
sizeof
*
new_argv
);
new_argv_volatile
=
new_argv
;
if
(
nargs
>
4
)
{
register
size_t
i
;
...
...
@@ -590,9 +588,20 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
BLOCK_INPUT
;
pid
=
vfork
();
/* vfork, and prevent local vars from being clobbered by the vfork. */
{
int
volatile
fd_error_volatile
=
fd_error
;
int
volatile
fd_output_volatile
=
fd_output
;
int
volatile
output_to_buffer_volatile
=
output_to_buffer
;
unsigned
char
const
**
volatile
new_argv_volatile
=
new_argv
;
new_argv
=
new_argv_volatile
;
pid
=
vfork
();
fd_error
=
fd_error_volatile
;
fd_output
=
fd_output_volatile
;
output_to_buffer
=
output_to_buffer_volatile
;
new_argv
=
new_argv_volatile
;
}
if
(
pid
==
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment