busybox-w32 version FRP-3532-g01a256149 was released on 2020-07-13. It is no longer current. For other release notes see:
The main change is a reduction in the number of processes that need
to be created. The shell creates a new process every time
it runs a command, starts a subshell or adds an item to a pipeline.
On Linux this can be rather efficient because of the separation
between the fork(2) and exec(2) system
calls. Windows doesn't have this distinction: both fork()
and exec() have to be emulated using CreateProcess()
which is notoriously slow.
In this release the execution of commands built into the BusyBox binary
is handled without the need for a call to exec().
Here are micro-benchmarks for how long it takes to run certain commands in the previous release (FRP-3466), the current release (FRP-3532) and on Linux. All times are in milliseconds.
| Command | FRP-3466 | FRP-3532 | Linux |
|---|---|---|---|
| echo 1 | 0.003 | 0.003 | 0.002 |
| seq 1 | 7.01 | 3.61 | 0.69 |
| seq 1 | grep 1 | 11.98 | 3.70 | 1.17 |
| seq 1 | grep 1 | grep 1 | 17.62 | 6.04 | 2.04 |
Further notes on performance.
busybox.exe might be
expected to process wildcards using Microsoft's
C runtime. However, doing this can cause incorrect operation of the
BusyBox shell which does its own wildcard processing. To avoid such
problems the default builds of busybox-w32 disabled Windows' globbing and
a separate build with Windows' globbing enabled was provided.
In this release the default has been changed such that Windows' globbing is applied when busybox-w32 is run from a Command Prompt but subsequent child processes have Windows globbing disabled. It is hoped that this will provide the correct behaviour both for users who run BusyBox applets from the Command Prompt and those who use the BusyBox shell.
If Windows' globbing isn't required it can be disabled at compile-time
by turning off the GLOBBING option. Alternatively it can
be disabled at run-time by setting the environment variable
BB_GLOBBING to 0.
(GitHub issues #172 and #187)
printf applet
outputs text and the code to handle ANSI escape sequences. This results
in escape sequences being output literally instead of processed
as expected.
printf has been modified to output text in a manner compatible
with handling of ANSI escape sequences in two specific cases:
$ RESET='\033[0m' $ printf '\033[31m%s%b\n' hello $RESET hello(GitHub issue #189)
ls command now treats files with the 'hidden'
attribute as if their names started with a dot. Such hidden files are only
displayed if the -a or -A options are given or
if they're listed explicitly on the command line.
chattr and lsattr applets have
been ported to Windows and enabled in the default build. The attribute codes
and names match those used by Cygwin.
| Code | Name |
|---|---|
| r | Reparse |
| o | Offline |
| e | Encrypted |
| c | Compressed |
| S | Sparse |
| r | Readonly |
| h | Hidden |
| s | System |
| a | Archive |
| t | Temporary |
| n | Notindexed |
chattr only
allows a subset of attributes to be changed. Specifically, those which
don't require changes to the representation of the file itself on disk.
time applet no longer returns garbage when
it's unable to find the command to run on 64-bit systems.
~ $ sh ~ $ sleep 10 ^C^C ~ $ ~ $ pwd sh: w: not found ~ $ sh: pd: not found ~ $
type and command -v
now avoid displaying duplicate slashes when elements of PATH
have a trailing slash. For some reason Microsoft seems to like adding
such superfluous slashes. (GitHub issue #191)
cd /// and cd /xyz when the current directory
is on a UNC path work better now. (GitHub issue #192)
winxp, noconsole
and nocaseglob didn't work as expected. This has been rectified.
awk and dpkg but no
new features.