| Commit message (Collapse) | Author | Files | Lines |
|
If an element of $PATH had a trailing slash 'which' displayed two
slashes when an executable was found in that directory.
This is a regression caused by upstream commit 49d9e06fb (libbb:
modify find_executable() to not temporarily write to PATH).
Prior to this commit find_executable() used concat_path_file() to
build the path of the executable. This avoids including duplicate
slashes in its output. The new code didn't.
Add a test in find_executable() to detect the problem. It still
fails if there are multiple trailing slashes. Don't do that.
Adds 48 bytes.
|
|
Additional support for background jobs was added in commits
010abea6f and 1403d81c4.
The condition ENABLE_PLATFORM_POSIX || JOBS_WIN32 in showjob()
is always true. The conditional compilation can be removed.
|
|
This didn't produce the expected output when run from ash:
ash -c "echo abc | sed s/a/x/" <&-
In general, if the last command in the pipe read from stdin the
command didn't work; if it read from file descriptor 0 (e.g. cat)
it did.
Closing a file descriptor caused the corresponding stream to
become invalid. For performance reasons the shell in busybox-w32
runs applets without an exec(), but that results in their seeing
the invalid stream from their parent.
Avoid the problem by calling exec() in such cases. This causes the
child process to get a new stdin stream initialised from the file
descriptor. The test also applies to stdout and stderr. There's
no discernable affect on performance when running the test suite.
Adds 64-96 bytes.
(GitHub issue #558)
|
|
Fix some compiler warnings and move the CNG algorithm caches into
get_alg_handle().
Saves 32 bytes in the x86_64 build with CNG enabled.
|
|
|
|
The existing CNG implementation relied on multiple features only
implemented in "newer" Windows versions. This new implementation does
not use the aforementioned features and is therefore compatible with
systems running Windows Vista or higher.
function old new delta
.rdata 87112 87288 +176
hmac_peek_hash 80 208 +128
get_alg_handle - 96 +96
algorithm_provider_hmac_cache - 48 +48
algorithm_provider_cache - 48 +48
alg_id_mappings - 48 +48
sha512_begin 16 48 +32
sha384_begin 16 48 +32
sha256_begin 16 48 +32
sha1_begin 16 48 +32
md5_begin 16 32 +16
hmac_hash_v 48 64 +16
hmac_end 48 64 +16
hmac_blocks.constprop.0 96 112 +16
__imp_BCryptOpenAlgorithmProvider - 8 +8
__imp_BCryptDuplicateHash - 8 +8
BCryptOpenAlgorithmProvider - 8 +8
BCryptDuplicateHash - 8 +8
------------------------------------------------------------------------------
(add/remove: 8/0 grow/shrink: 10/0 up/down: 768/0) Total: 768 bytes
|
|
The make applet is based on code from pdpmake. Make a few minor
adjustments to bring the two into line.
The only one of any significance is setting 'target' to NULL in
docmds().
Adds 16 bytes.
|
|
function old new delta
send_file_and_exit 931 933 +2
get_line 126 120 -6
httpd_main 968 959 -9
send_headers 708 694 -14
handle_incoming_and_exit 2285 2270 -15
cgi_io_loop_and_exit 635 620 -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/5 up/down: 2/-59) Total: -57 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
parse_expr 986 998 +12
chain_group 633 640 +7
next_token 930 934 +4
getvar_s 102 101 -1
awk_main 891 888 -3
evaluate 3379 3355 -24
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/3 up/down: 23/-28) Total: -5 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
httpd_main 957 968 +11
log_and_exit 25 26 +1
send_headers 712 708 -4
handle_incoming_and_exit 2292 2285 -7
sigalrm_handler 102 93 -9
parse_conf 1332 1323 -9
send_cgi_and_exit 803 790 -13
cgi_io_loop_and_exit 656 635 -21
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/6 up/down: 12/-63) Total: -51 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
cgi_io_loop_and_exit 496 656 +160
sigalrm_handler 1 102 +101
.rodata 106814 106853 +39
send_cgi_and_exit 770 803 +33
packed_usage 35894 35924 +30
httpd_main 950 957 +7
handle_incoming_and_exit 2297 2292 -5
send_REQUEST_TIMEOUT_and_exit 10 - -10
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 6/1 up/down: 370/-15) Total: 355 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
One more from the POSIX documentation and some examples from
coreutils.
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Do one less write()
function old new delta
handle_incoming_and_exit 2290 2297 +7
cgi_io_loop_and_exit 498 500 +2
.rodata 106821 106814 -7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 9/-7) Total: 2 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
cgi_io_loop_and_exit 477 498 +21
.rodata 106830 106821 -9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 21/-9) Total: 12 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
log_and_exit 33 25 -8
handle_incoming_and_exit 2298 2290 -8
send_cgi_and_exit 784 770 -14
cgi_io_loop_and_exit 538 477 -61
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-91) Total: -91 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
send_file_and_exit 891 931 +40
send_EOF_and_exit - 14 +14
cgi_io_loop_and_exit 535 538 +3
log_and_exit 44 33 -11
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/1 up/down: 57/-11) Total: 46 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
send_file_and_exit 891 930 +39
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
prepare_write_timeout - 29 +29
static.tv - 16 +16
httpd_main 939 950 +11
send_file_and_exit 887 891 +4
handle_incoming_and_exit 2306 2298 -8
cgi_io_loop_and_exit 552 535 -17
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/2 up/down: 60/-25) Total: 35 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Set up the signal handler once, outside of main loop.
Do not reset the timer if headers are big - they still are expected
to arrive quickly.
function old new delta
httpd_main 913 939 +26
handle_incoming_and_exit 2312 2306 -6
get_line 134 126 -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 26/-14) Total: 12 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
get_line 130 134 +4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
This removes the need to check various corner cases later.
function old new delta
get_line 108 130 +22
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
handle_incoming_and_exit 2264 2312 +48
httpd_main 915 913 -2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 48/-2) Total: 46 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
We were lacking even basic rate-limiting.
function old new delta
httpd_main 648 915 +267
handle_incoming_and_exit 2235 2264 +29
packed_usage 35868 35894 +26
cgi_io_loop_and_exit 537 552 +15
send_headers 704 712 +8
get_line 106 108 +2
.rodata 106829 106830 +1
send_file_and_exit 890 887 -3
mini_httpd 161 - -161
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 7/1 up/down: 348/-164) Total: 184 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
sighup_handler 30 47 +17
httpd_main 710 695 -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 17/-15) Total: 2 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
httpd_main 701 710 +9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
text data bss dec hex filename
4003 40 352 4395 112b httpd_ratelimit_cgi
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
send_cgi_and_exit 711 784 +73
vmstat_main 657 708 +51
.rodata 106746 106778 +32
send_file_and_exit 877 887 +10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 166/0) Total: 166 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Since commit f7bcc977c (ash: make ctrl-c trap handling closer to
upstream) when ctrl-c was entered at an interactive prompt without
a 'trap INT' in force, '^C' was echoed to the console twice.
Detect this condition and avoid the duplication.
Adds 16 bytes.
|
|
function old new delta
vmstat_main 657 708 +51
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
load_row 661 1061 +400
vmstat_main 561 657 +96
.rodata 106716 106746 +30
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 526/0) Total: 526 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
mingw-w64 has introduced an implementation of mkdtemp() for its
14.0.0 release. Use this in preference to the internal code,
where available.
(GitHub issue #555)
|
|
function old new delta
vmstat_main 559 561 +2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
vmstat_main 230 559 +329
print_row 340 - -340
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 329/-340) Total: -11 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
print_row 247 340 +93
.rodata 106717 106716 -1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 93/-1) Total: 92 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
print_row 215 247 +32
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
load_row 667 661 -6
next_col 105 59 -46
coldescs 239 146 -93
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-145) Total: -145 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|