aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-12-09 14:12:02 +0000
committerRon Yorston <rmy@pobox.com>2018-12-09 14:22:39 +0000
commit4a5a8422feab7d38f60d2576e32916f9cf711d29 (patch)
tree6ce0ec8dc2666bdfa1b5565d36cd2b143608239d
parent3a975bd37b82a6e66a2cd5977544b03a6b24ce70 (diff)
downloadbusybox-w32-4a5a8422feab7d38f60d2576e32916f9cf711d29.tar.gz
busybox-w32-4a5a8422feab7d38f60d2576e32916f9cf711d29.tar.bz2
busybox-w32-4a5a8422feab7d38f60d2576e32916f9cf711d29.zip
ash: use auto_win32_extension() in tryexec()
-rw-r--r--shell/ash.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 587cf2abb..22dedc1b6 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -8404,11 +8404,8 @@ tryexec(IF_FEATURE_SH_STANDALONE(int applet_no,) const char *cmd, char **argv, c
8404#endif 8404#endif
8405 8405
8406#if ENABLE_PLATFORM_MINGW32 8406#if ENABLE_PLATFORM_MINGW32
8407 { 8407 cmd = auto_win32_extension(cmd) ?: cmd;
8408 char *new_cmd = alloc_win32_extension(cmd); 8408 execve(cmd, argv, envp);
8409 execve(new_cmd ? new_cmd : cmd, argv, envp);
8410 free(new_cmd);
8411 }
8412 /* skip POSIX-mandated retry on ENOEXEC */ 8409 /* skip POSIX-mandated retry on ENOEXEC */
8413#else 8410#else
8414 repeat: 8411 repeat:
@@ -8446,7 +8443,7 @@ tryexec(IF_FEATURE_SH_STANDALONE(int applet_no,) const char *cmd, char **argv, c
8446 argv[0] = (char*) "ash"; 8443 argv[0] = (char*) "ash";
8447 goto repeat; 8444 goto repeat;
8448 } 8445 }
8449#endif 8446#endif /* ENABLE_PLATFORM_MINGW32 */
8450} 8447}
8451 8448
8452/* 8449/*