← Commit list

1c31501b1

Eric Andersen
Eric Andersen
2002-04-26
FAILED Duration: 3s

Subject

Ensure that getenv("PATH") stays current, since otherwise cmdedit (which calls getenv("PATH")) would not operate upon the current PATH settings, which was really quite iritating. -Erik

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/ash.c+3 -1
@@ -4111,6 +4111,8 @@ path_change(const char *newval, int *bltin)
}
if (builtinloc >= 0 && *bltin < 0)
firstchange = 0;
+ /* Ensure that getenv("PATH") stays current */
+ setenv("PATH", newval, 1);
return firstchange;
}
/*
@@ -12433,7 +12435,7 @@ findvar(struct var **vpp, const char *name)
/*
* Copyright (c) 1999 Herbert Xu <[email protected]>
* This file contains code for the times builtin.
- * $Id: ash.c,v 1.48 2002/04/24 23:12:10 andersen Exp $
+ * $Id: ash.c,v 1.49 2002/04/26 23:39:48 andersen Exp $
*/
static int timescmd (int argc, char **argv)
{
shell/msh.c+2 -0
@@ -842,6 +842,8 @@ extern int msh_main(int argc, char **argv)
#endif
}
onecommand();
+ /* Ensure that getenv("PATH") stays current */
+ setenv("PATH", path->value, 1);
}
}