diff options
author | Ron Yorston <rmy@pobox.com> | 2018-04-04 19:55:09 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2018-04-04 19:55:09 +0100 |
commit | 33a914da6bba61e27aee82675276bf1dccc52966 (patch) | |
tree | 2242719bf4bb7705504967d54d137d6fe19cc8f3 /shell | |
parent | 016ca978455df7257a92236bbfb0c67de4a4bcd8 (diff) | |
download | busybox-w32-33a914da6bba61e27aee82675276bf1dccc52966.tar.gz busybox-w32-33a914da6bba61e27aee82675276bf1dccc52966.tar.bz2 busybox-w32-33a914da6bba61e27aee82675276bf1dccc52966.zip |
ps: obtain applet names from other BusyBox processes
Remove the code which passed applet names to child processes using
environment variables. This only allowed ps to display names for
its ancestors.
Instead attempt to read applet names from the memory of unrelated
processes.
The Microsoft documentation alone wasn't enough to figure out how
to do this. Additional hints from:
https://stackoverflow.com/questions/4298331/exe-or-dll-image-base-address
https://stackoverflow.com/questions/14467229/get-base-address-of-process
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/shell/ash.c b/shell/ash.c index 2a1ddac39..6d24fb55a 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -14975,13 +14975,6 @@ reinitvar(void) | |||
14975 | varinit[i].var_func = varinit_data[i].var_func; | 14975 | varinit[i].var_func = varinit_data[i].var_func; |
14976 | } | 14976 | } |
14977 | vlineno.var_text = linenovar; | 14977 | vlineno.var_text = linenovar; |
14978 | |||
14979 | /* | ||
14980 | * BB_APPLET_<pid> was correct when 'sh --forkshell' was started | ||
14981 | * but has now been overwritten by the environment from the forkshell | ||
14982 | * data block. Reinstate it. | ||
14983 | */ | ||
14984 | setvareq(bb_applet_pid(), VEXPORT); | ||
14985 | } | 14978 | } |
14986 | 14979 | ||
14987 | /* FIXME: should consider running forkparent() and forkchild() */ | 14980 | /* FIXME: should consider running forkparent() and forkchild() */ |