aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2002-06-06 12:07:28 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2002-06-06 12:07:28 +0000
commit978aa2385f1f3dc96c351874a638dda96ac3ad9b (patch)
treef02276d7dfb21f6a572be54819966c43a3253e5f /shell
parentc44c5b45397417839a53850e7968c9aa1d9ec829 (diff)
downloadbusybox-w32-978aa2385f1f3dc96c351874a638dda96ac3ad9b.tar.gz
busybox-w32-978aa2385f1f3dc96c351874a638dda96ac3ad9b.tar.bz2
busybox-w32-978aa2385f1f3dc96c351874a638dda96ac3ad9b.zip
Patch from vodz to only setenv PATH when PATH changes, which is much
smarter than my quick fix. git-svn-id: svn://busybox.net/trunk/busybox@4863 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c
index d834cc02a..80da35b59 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -3841,6 +3841,8 @@ changepath(const char *newval)
3841 builtinloc = bltin; /* zap builtins */ 3841 builtinloc = bltin; /* zap builtins */
3842 clearcmdentry(firstchange); 3842 clearcmdentry(firstchange);
3843 builtinloc = bltin; 3843 builtinloc = bltin;
3844 /* Ensure that getenv("PATH") stays current */
3845 setenv("PATH", newval, 1);
3844} 3846}
3845 3847
3846 3848
@@ -4111,8 +4113,6 @@ path_change(const char *newval, int *bltin)
4111 } 4113 }
4112 if (builtinloc >= 0 && *bltin < 0) 4114 if (builtinloc >= 0 && *bltin < 0)
4113 firstchange = 0; 4115 firstchange = 0;
4114 /* Ensure that getenv("PATH") stays current */
4115 setenv("PATH", newval, 1);
4116 return firstchange; 4116 return firstchange;
4117} 4117}
4118/* 4118/*
@@ -12442,7 +12442,7 @@ findvar(struct var **vpp, const char *name)
12442/* 12442/*
12443 * Copyright (c) 1999 Herbert Xu <herbert@debian.org> 12443 * Copyright (c) 1999 Herbert Xu <herbert@debian.org>
12444 * This file contains code for the times builtin. 12444 * This file contains code for the times builtin.
12445 * $Id: ash.c,v 1.51 2002/06/04 20:10:15 sandman Exp $ 12445 * $Id: ash.c,v 1.52 2002/06/06 12:07:28 andersen Exp $
12446 */ 12446 */
12447static int timescmd (int argc, char **argv) 12447static int timescmd (int argc, char **argv)
12448{ 12448{