diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c index 8cc7a5c75..3d6f25802 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -8689,6 +8689,8 @@ tryexec(IF_FEATURE_SH_STANDALONE(int applet_no,) const char *cmd, char **argv, c | |||
8689 | struct forkshell *fs = (struct forkshell *)sticky_mem_start; | 8689 | struct forkshell *fs = (struct forkshell *)sticky_mem_start; |
8690 | if (applet_main[applet_no] != ash_main || | 8690 | if (applet_main[applet_no] != ash_main || |
8691 | (fs && fs->fpid == FS_SHELLEXEC)) { | 8691 | (fs && fs->fpid == FS_SHELLEXEC)) { |
8692 | /* mingw-w64's getopt() uses __argv[0] as the program name */ | ||
8693 | __argv[0] = (char *)cmd; | ||
8692 | # else | 8694 | # else |
8693 | if (APPLET_IS_NOEXEC(applet_no)) { | 8695 | if (APPLET_IS_NOEXEC(applet_no)) { |
8694 | # endif | 8696 | # endif |