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>
This commit is contained in:
Sheldon Hearn 1999-07-19 11:00:33 +00:00
parent 7f37499c9c
commit 58aa6f74a2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=48896

View File

@ -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);