diff options
| author | Ron Yorston <rmy@pobox.com> | 2026-02-25 09:33:36 +0000 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2026-02-25 09:33:36 +0000 |
| commit | 35e590816a844e3ccc707c841b756e83987d09eb (patch) | |
| tree | 11f62b2eeb78343e29c7597e083c77ce8fed7e1f /libbb/replace.c | |
| parent | 686a0803f9747206eef5337100c5338431891e45 (diff) | |
| download | busybox-w32-35e590816a844e3ccc707c841b756e83987d09eb.tar.gz busybox-w32-35e590816a844e3ccc707c841b756e83987d09eb.tar.bz2 busybox-w32-35e590816a844e3ccc707c841b756e83987d09eb.zip | |
ash: allow execution of busybox-w32 binary without extension
If the busybox-w32 binary didn't have an extension the shell was
unable to spawn itself:
$ ls -l busybox
-rwxrwxr-x 1 rmy rmy 661006 Feb 25 09:37 busybox
$ ./busybox sh
$ ls
sh: unable to spawn shell
This happened because the shell used spawnve() from the C runtime
to execute itself. Microsoft insists on trying to add an extension
to the name of the binary unless it has an explicit '.' as its
last character.
Use the internal spawnveq() instead, as it handles various quirks
like the above.
Adds 16-32 bytes.
(GitHub issue #566)
Diffstat (limited to 'libbb/replace.c')
0 files changed, 0 insertions, 0 deletions
