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
16425c4a
Commit
16425c4a
authored
Jul 31, 2000
by
Eli Zaretskii
Browse files
(child_setup) [MSDOS]: malloc pwd_var instead of
using alloca; free it after run_msdos_command returns
parent
74c07faf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
src/ChangeLog
src/ChangeLog
+10
-0
src/callproc.c
src/callproc.c
+8
-0
No files found.
src/ChangeLog
View file @
16425c4a
2000-07-31 Eli Zaretskii <eliz@is.elta.co.il>
* msdos.c (run_msdos_command): Save and restore the master
environment, for the case that child_setup signals an error.
When mirroring slashes in DOS shell commands, don't fail when
argv[2] has embedded blanks.
* callproc.c (child_setup) [MSDOS]: malloc pwd_var instead of
using alloca; free it after run_msdos_command returns.
2000-07-27 Dave Love <fx@gnu.org>
* s/irix6-5.h (IRIX_FORCE_32_BITS, LD_SWITCH_SYSTEM): Don't
...
...
src/callproc.c
View file @
16425c4a
...
...
@@ -1072,7 +1072,14 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir)
register
int
i
;
i
=
STRING_BYTES
(
XSTRING
(
current_dir
));
#ifdef MSDOS
/* MSDOS must have all environment variables malloc'ed, because
low-level libc functions that launch subsidiary processes rely
on that. */
pwd_var
=
(
char
*
)
xmalloc
(
i
+
6
);
#else
pwd_var
=
(
char
*
)
alloca
(
i
+
6
);
#endif
temp
=
pwd_var
+
4
;
bcopy
(
"PWD="
,
pwd_var
,
4
);
bcopy
(
XSTRING
(
current_dir
)
->
data
,
temp
,
i
);
...
...
@@ -1212,6 +1219,7 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir)
#ifdef MSDOS
pid
=
run_msdos_command
(
new_argv
,
pwd_var
+
4
,
in
,
out
,
err
,
env
);
free
(
pwd_var
);
if
(
pid
==
-
1
)
/* An error occurred while trying to run the subprocess. */
report_file_error
(
"Spawning child process"
,
Qnil
);
...
...
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