<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/shell/shell_common.c, branch long_paths</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=long_paths</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=long_paths'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2025-11-23T10:05:39+00:00</updated>
<entry>
<title>ash: allow ctrl-c to interrupt read in mintty</title>
<updated>2025-11-23T10:05:39+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2025-11-23T10:05:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=42c3b212d9f9fe964401ed45b1cfd4b67066fb80'/>
<id>urn:sha1:42c3b212d9f9fe964401ed45b1cfd4b67066fb80</id>
<content type='text'>
The command 'read -t 10' couldn't be interrupted by ctrl-c
when ash was running in the mintty terminal emulator.

This issue was introduced by commits 8e6991733 and b2901ce8e
which fixed other problems with the 'read' builtin.

Rearrange the code to avoid calling poll(2) in an interactive
shell on Windows.

(GitHub issue #547)
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2025-08-10T06:46:58+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2025-08-10T06:46:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=c70a65f36c017f6feb7e86415bec1a644e71dbab'/>
<id>urn:sha1:c70a65f36c017f6feb7e86415bec1a644e71dbab</id>
<content type='text'>
</content>
</entry>
<entry>
<title>shell: avoid miscounting backslashes in read built-in</title>
<updated>2025-07-07T11:39:16+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2025-07-07T11:39:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=1d659554ca999c4d5ad1793d5007526f84fdac89'/>
<id>urn:sha1:1d659554ca999c4d5ad1793d5007526f84fdac89</id>
<content type='text'>
When the '-n' option was used to limit the number of characters
read, any backslashes in the input weren't correctly accounted
for.

Adds 16 bytes.

(GitHub issue #504)
</content>
</entry>
<entry>
<title>shell: fix race between signal handlers setting bb_got_signal and poll()</title>
<updated>2025-07-02T20:42:47+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2025-07-02T20:42:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=36ac283682bb176987c0c09e5f8c7e7e96fb1651'/>
<id>urn:sha1:36ac283682bb176987c0c09e5f8c7e7e96fb1651</id>
<content type='text'>
function                                             old     new   delta
__ppoll_time64                                         -     211    +211
check_got_signal_and_poll                              -     164    +164
read_key                                             607     601      -6
shell_builtin_read                                  1328    1318     -10
------------------------------------------------------------------------------
(add/remove: 4/0 grow/shrink: 0/2 up/down: 375/-16)           Total: 359 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>use pollfd[1] array for poll() argument</title>
<updated>2025-07-02T19:55:42+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2025-07-02T19:55:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=bbaa56f7378240fca3db9165dfd02a4504d95ff1'/>
<id>urn:sha1:bbaa56f7378240fca3db9165dfd02a4504d95ff1</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>shell: improve bash compatibility of read built-in</title>
<updated>2025-07-01T18:21:37+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2025-07-01T08:47:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=dcd8df258a402658ad1fdc018a245b06a610ca8d'/>
<id>urn:sha1:dcd8df258a402658ad1fdc018a245b06a610ca8d</id>
<content type='text'>
Make the read built-in more compatible with bash:

- Return an exit code of 142 on timeout.

- When the timeout expires before a newline is detected in the
  input bash captures the partial input.  This behaviour is new
  since bash version 4.4.  BusyBox shells had the pre-4.4 behaviour
  where the input was lost.

Update the tests to suit and fix a couple of compiler errors in
the testsuite.

function                                             old     new   delta
builtin_read                                         154     174     +20
readcmd                                              213     228     +15
shell_builtin_read                                  1364    1370      +6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 41/0)               Total: 41 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: don't mistake errors for timeouts in read built-in</title>
<updated>2025-07-01T08:16:20+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2025-07-01T08:16:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=4835252c89966d694b919b10deb28b3851648657'/>
<id>urn:sha1:4835252c89966d694b919b10deb28b3851648657</id>
<content type='text'>
Commit e07a73a15 (ash: bring 'read' built-in closer to bash)
added code to treat a timeout differently from an error returned
by poll(2).  This falsely assumed that only an EINTR error was
relevant.  We must allow for other errors.

Adds 16 bytes.

(GitHub issue #502)
</content>
</entry>
<entry>
<title>ash: bring 'read' built-in closer to bash</title>
<updated>2025-06-29T12:33:24+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2025-06-29T12:33:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=e07a73a1502b0aba8fde7d9e491a3f8cc42dc341'/>
<id>urn:sha1:e07a73a1502b0aba8fde7d9e491a3f8cc42dc341</id>
<content type='text'>
Commit 8e6991733 (ash: fix 'read' shell built-in (1)) noted
discrepancies between upstream BusyBox, busybox-w32 and bash.
It aligned busybox-w32 with upstream BusyBox.  Apply further
changes in busybox-w32 to align 'read' more closely with bash.

- When a timeout occurs before a newline in the input stream,
  capture and save the text collected so far.

- Return an exit code of 142 on timeout.

Also, since our implementation of poll(2) never sets errno to
EINTR the code to handle this case can be omitted.

Saves 16 bytes in the 64-bit build, adds 16 in 32-bit.

(GitHub issue #502)
</content>
</entry>
<entry>
<title>ash: fix 'read' built-in performance regression</title>
<updated>2024-03-06T20:37:54+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2024-03-06T20:29:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=f53b77dcfee44156aa2ead90748dca3df4c0b710'/>
<id>urn:sha1:f53b77dcfee44156aa2ead90748dca3df4c0b710</id>
<content type='text'>
Commits 8e6991733 and b2901ce8e fixed problems with the 'read'
shell built-in when the '-t' option was used.  However, they
result in a performance penalty.  This pipeline:

   seq -w 0 999999 | while read line; do :; done

takes 10 times longer than prior to the changes.

If no timeout is specified don't call poll(2).

Costs 16 bytes in a 32-bit build; 0 in 64-bit.
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2023-07-13T07:06:26+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2023-07-13T07:06:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=bd978d0256fd3a67de1a7dd54f1a37f9435be363'/>
<id>urn:sha1:bd978d0256fd3a67de1a7dd54f1a37f9435be363</id>
<content type='text'>
</content>
</entry>
</feed>
