aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/appletlib.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 1bae940c2..733d9ca12 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -990,6 +990,15 @@ void FAST_FUNC run_applet_no_and_exit(int applet_no, const char *name, char **ar
990 } 990 }
991 if (ENABLE_FEATURE_SUID) 991 if (ENABLE_FEATURE_SUID)
992 check_suid(applet_no); 992 check_suid(applet_no);
993
994#if ENABLE_PLATFORM_MINGW32
995 {
996 char *var = xasprintf("BB_APPLET_%d=%s", getpid(), applet_name);
997 putenv(var);
998 free(var);
999 }
1000#endif
1001
993 xfunc_error_retval = applet_main[applet_no](argc, argv); 1002 xfunc_error_retval = applet_main[applet_no](argc, argv);
994 /* Note: applet_main() may also not return (die on a xfunc or such) */ 1003 /* Note: applet_main() may also not return (die on a xfunc or such) */
995 xfunc_die(); 1004 xfunc_die();