diff options
author | Ron Yorston <rmy@pobox.com> | 2014-03-20 21:47:19 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2014-03-20 21:47:19 +0000 |
commit | 13406a9e534a0d3a790c84c6366aea597944daaf (patch) | |
tree | 1c2a1f9465d99242de16ac8552c73136b15333f1 | |
parent | 11f1f922617556a33a6685f691cd2224448ff420 (diff) | |
download | busybox-w32-13406a9e534a0d3a790c84c6366aea597944daaf.tar.gz busybox-w32-13406a9e534a0d3a790c84c6366aea597944daaf.tar.bz2 busybox-w32-13406a9e534a0d3a790c84c6366aea597944daaf.zip |
ash: set fake PPID value
-rw-r--r-- | shell/ash.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c index 3d9af3891..2fc276e78 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -27,7 +27,7 @@ | |||
27 | * - both / and \ are supported in PATH. Usually you must use / | 27 | * - both / and \ are supported in PATH. Usually you must use / |
28 | * - trap/job does not work | 28 | * - trap/job does not work |
29 | * - /dev/null is supported for redirection | 29 | * - /dev/null is supported for redirection |
30 | * - no $PPID | 30 | * - fake $PPID |
31 | */ | 31 | */ |
32 | 32 | ||
33 | /* | 33 | /* |
@@ -13599,8 +13599,7 @@ init(void) | |||
13599 | } | 13599 | } |
13600 | } | 13600 | } |
13601 | 13601 | ||
13602 | if (!ENABLE_PLATFORM_MINGW32) | 13602 | setvar2("PPID", utoa(getppid())); |
13603 | setvar2("PPID", utoa(getppid())); | ||
13604 | #if ENABLE_ASH_BASH_COMPAT | 13603 | #if ENABLE_ASH_BASH_COMPAT |
13605 | p = lookupvar("SHLVL"); | 13604 | p = lookupvar("SHLVL"); |
13606 | setvar("SHLVL", utoa((p ? atoi(p) : 0) + 1), VEXPORT); | 13605 | setvar("SHLVL", utoa((p ? atoi(p) : 0) + 1), VEXPORT); |