<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/shell, branch cron_changes</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=cron_changes</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=cron_changes'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2026-05-13T11:32:26+00:00</updated>
<entry>
<title>ash: prevent leakage of process handles</title>
<updated>2026-05-13T11:32:26+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-05-13T11:32:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=bda604a70761e7791e5bfd00337bfc6f9e6ae640'/>
<id>urn:sha1:bda604a70761e7791e5bfd00337bfc6f9e6ae640</id>
<content type='text'>
When the shell invoked process substitution it retained a process
handle to the child.  These handles could accumulate without limit.

The shell in upstream BusyBox doesn't bother to create a job
structure for process substitutions or here documents.  This isn't
appropriate on Windows, where we need to track the child process
handles.  Create job structures as required.

Saves 32-48 bytes.

(GitHub issue #587)
</content>
</entry>
<entry>
<title>ash: further fixes to merge of upstream changes</title>
<updated>2026-05-06T12:57:04+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-05-06T12:57:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=169694ebdba292f6533f78aeea678bfbb907396c'/>
<id>urn:sha1:169694ebdba292f6533f78aeea678bfbb907396c</id>
<content type='text'>
Commits e23652908 and 686a0803f (ash: fix execution of applets via
Unix-style path) were necessary following a major revision of the
shell upstream.

Another problem was found:

   $ sh
   $ PATH="/usr/bin;$PATH" exec non-existent

resulted in a segfault.  This happened because during a PATH search
tryexec() modified argv[0] when it detected a Unix-style path (in
this case '/usr/bin/non-existent') but failed to restore it if the
execution failed.

There were other issues:

- The logic of the new code failed to match the original:  the test
  for a Unix-style path should only have happened if an attempt to
  execute the full path had already failed.

- The test for a script running an interpreter which is an applet
  also modified argv.  If the execution failed argv should have
  been restored to its original state.

- During a PATH search the 'path' pointer walked through the
  elements of the path.  This pointer was also used to determine
  if an applet was overridden by an executable.  This is wrong:
  the full PATH variable should have been used.

The code around tryexec()/shellexec() has been rewritten to take
these issues into account.

Adds 32-48 bytes.

(GitHub issue #584)
</content>
</entry>
<entry>
<title>ash: fix build failure if SH_STANDALONE is disabled</title>
<updated>2026-05-05T07:14:22+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-05-05T07:14:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=9351ea0819bfb05da32389d93964acc56b076c8d'/>
<id>urn:sha1:9351ea0819bfb05da32389d93964acc56b076c8d</id>
<content type='text'>
It wasn't possible to build ash if FEATURE_SH_STANDALONE was
disabled.

This issue was introduced during the large merge of upstream
changes to ash in commit e23652908.
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2026-03-11T10:14:49+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-03-11T10:14:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=ede205bd07573813337b5706acb0cae3b127a36f'/>
<id>urn:sha1:ede205bd07573813337b5706acb0cae3b127a36f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ash: fix here strings causing segfault in function invocation</title>
<updated>2026-03-09T14:23:59+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-03-04T15:04:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=e527bd22dbda697d09d4dff8786c6290d79d577a'/>
<id>urn:sha1:e527bd22dbda697d09d4dff8786c6290d79d577a</id>
<content type='text'>
The size of the NFROMSTR struct wasn't initialised in the nodesize
array, so we got:

   $ ./busybox sh
   $ f() { cat &lt;&lt;&lt; hello; }
   $ f
   Segmentation fault         (core dumped) ./busybox sh

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: fix here strings causing segfault in subshells</title>
<updated>2026-03-04T14:27:16+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-03-04T14:27:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=b8b19b18ad8f189e1a6f52043dabe8d38d19b883'/>
<id>urn:sha1:b8b19b18ad8f189e1a6f52043dabe8d38d19b883</id>
<content type='text'>
A here string in a subshell or function invocation caused a SEGV.
This was due to an upstream bug:  the size of the NFROMSTR struct
wasn't initialised in the nodesize array.

(GitHub issue #567)
</content>
</entry>
<entry>
<title>ash: fix help builtin and tab completion of builtins</title>
<updated>2026-02-28T10:25:05+00:00</updated>
<author>
<name>Ron Yorston via busybox</name>
<email>busybox@busybox.net</email>
</author>
<published>2026-02-08T10:16:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=b59b00323181d5d450a92959b9bbfe3585c6786b'/>
<id>urn:sha1:b59b00323181d5d450a92959b9bbfe3585c6786b</id>
<content type='text'>
Commit 56143ea63 (ash: code shrink: eliminate pstrcmp1()) changed
the layout of struct builtincmd so the name member points to the
start of the name, not the flag in the first element of the string.
This broke the help builtin and tab completion of builtins.

Remove the unnecessary '+ 1' in ash_command_name() and helpcmd().

ash_command_name                                      92      91      -1
helpcmd                                              106     102      -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-5)               Total: -5 bytes

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: allow execution of busybox-w32 binary without extension</title>
<updated>2026-02-25T09:33:36+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-02-25T09:33:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=35e590816a844e3ccc707c841b756e83987d09eb'/>
<id>urn:sha1:35e590816a844e3ccc707c841b756e83987d09eb</id>
<content type='text'>
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)
</content>
</entry>
<entry>
<title>*: placate warnings where strchr/strstr returns constant pointer</title>
<updated>2026-02-15T14:15:30+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2026-02-15T13:41:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=b668e52c906b664b353d5a99cfa3ff36f73b341d'/>
<id>urn:sha1:b668e52c906b664b353d5a99cfa3ff36f73b341d</id>
<content type='text'>
Newer glibc is now smarter and can propagate const-ness from those!

function                                             old     new   delta
readtoken1                                          3111    3108      -3

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: fix execution of applets via Unix-style path</title>
<updated>2026-02-14T21:09:47+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-02-14T21:09:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=686a0803f9747206eef5337100c5338431891e45'/>
<id>urn:sha1:686a0803f9747206eef5337100c5338431891e45</id>
<content type='text'>
Merging of upstream changes to ash failed to ensure that applets
could be executed using a Unix-style path.

Move the necessary code from shellexec() to tryexec().

(GitHub issue #565)
</content>
</entry>
</feed>
