002-upstream_ash_fix.patch 314 B

1234567891011
  1. --- a/shell/ash.c
  2. +++ b/shell/ash.c
  3. @@ -13014,7 +13014,7 @@ init(void)
  4. setvar2("PPID", utoa(getppid()));
  5. #if ENABLE_ASH_BASH_COMPAT
  6. p = lookupvar("SHLVL");
  7. - setvar2("SHLVL", utoa(p ? atoi(p) + 1 : 1));
  8. + setvar("SHLVL", utoa((p ? atoi(p) : 0) + 1), VEXPORT);
  9. #endif
  10. p = lookupvar("PWD");
  11. if (p) {