diff options
author | sheldonh <sheldonh@FreeBSD.org> | 1999-07-19 11:00:33 +0000 |
---|---|---|
committer | sheldonh <sheldonh@FreeBSD.org> | 1999-07-19 11:00:33 +0000 |
commit | 3f0530abee81a62f516046286408f1c1bcf15a33 (patch) | |
tree | 596fdcf5b9baab6d29ff9f2bd68147e8b74125d4 /bin/sh | |
parent | 0cabe704299fcebdc2868574a9189e45093b33b6 (diff) | |
download | FreeBSD-src-3f0530abee81a62f516046286408f1c1bcf15a33.zip FreeBSD-src-3f0530abee81a62f516046286408f1c1bcf15a33.tar.gz |
Fix handling of the cd command inside evaluations. It was changing PWD,
which it should not do.
PR: 12578
Reported by: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Submitted by: Niall Smart <niall@pobox.com>
Diffstat (limited to 'bin/sh')
-rw-r--r-- | bin/sh/eval.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/sh/eval.c b/bin/sh/eval.c index 2a1e760..4c762ba 100644 --- a/bin/sh/eval.c +++ b/bin/sh/eval.c @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95"; #endif static const char rcsid[] = - "$Id: eval.c,v 1.18 1999/04/21 11:52:39 cracauer Exp $"; + "$Id: eval.c,v 1.19 1999/05/08 10:21:46 kris Exp $"; #endif /* not lint */ #include <signal.h> @@ -712,6 +712,7 @@ evalcommand(cmd, flags, backcmd) && ((flags & EV_EXIT) == 0 || Tflag)) || ((flags & EV_BACKCMD) != 0 && (cmdentry.cmdtype != CMDBUILTIN + || cmdentry.u.index == CDCMD || cmdentry.u.index == DOTCMD || cmdentry.u.index == EVALCMD))) { jp = makejob(cmd, 1); |