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
48178f9a
Commit
48178f9a
authored
Mar 04, 2002
by
Eli Zaretskii
Browse files
(sys_subshell): Fix last change.
parent
c0917202
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/sysdep.c
src/sysdep.c
+5
-4
No files found.
src/sysdep.c
View file @
48178f9a
...
...
@@ -851,19 +851,20 @@ sys_subshell ()
#ifdef MSDOS
/* Demacs 1.1.2 91/10/20 Manabu Higashida */
{
char *old_pwd = getenv ("PWD");
char
*
epwd
=
getenv
(
"PWD"
);
char
old_pwd
[
MAXPATHLEN
+
1
+
4
];
/* If PWD is set, pass it with corrected value. */
if (
old_
pwd)
if
(
e
pwd
)
{
old_pwd = xstrdup (old_
pwd);
strcpy
(
old_pwd
,
e
pwd
);
if
(
str
[
len
-
1
]
==
'/'
)
str
[
len
-
1
]
=
'\0'
;
setenv
(
"PWD"
,
str
,
1
);
}
st
=
system
(
sh
);
chdir
(
oldwd
);
if (
old_
pwd)
if
(
e
pwd
)
putenv
(
old_pwd
);
/* restore previous value */
}
#if 0 /* This is also reported if last command executed in subshell failed, KFS */
...
...
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