diff options
author | Ron Yorston <rmy@pobox.com> | 2024-07-28 12:48:40 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-07-28 12:48:40 +0100 |
commit | bb8f6b688a6a8c7ac66b5c656d2544f9167a1abe (patch) | |
tree | 42b5f06c92dad20f5d9f85e349b6f1084490ed0b /TODO | |
parent | fe927d870601af570b22889ecc267b008af35404 (diff) | |
download | busybox-w32-bb8f6b688a6a8c7ac66b5c656d2544f9167a1abe.tar.gz busybox-w32-bb8f6b688a6a8c7ac66b5c656d2544f9167a1abe.tar.bz2 busybox-w32-bb8f6b688a6a8c7ac66b5c656d2544f9167a1abe.zip |
ash: fix slow running when background job is present
It was noted that a simple 'while' loop would take considerably
longer to run in a shell which had spawned a background job
compared to one that hadn't.
The problem originates with commit 4d8a277d59 (Implement nonblocking
wait) which introduced a nonblocking wait in ash.
This was found to cause the shell to use 100% of CPU when running
'sleep 60'. This was 'fixed' by commit 88b8cb61e (ash: Add a very
small timeout to nonblocking wait).
Subsequently commit 96c9c0044 (ash: allow waitpid_child to block)
fixed a problem with the logic of the original commit, but it left
the small timeout in place. It is this timeout which slows down
the shell when a background job is present.
The solution is to restore the 0 timeout for the nonblocking wait.
Saves 0-16 bytes.
(GitHub issue #434)
Diffstat (limited to 'TODO')
0 files changed, 0 insertions, 0 deletions