diff options
| author | Ron Yorston <rmy@pobox.com> | 2026-05-08 14:18:44 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2026-05-08 14:18:44 +0100 |
| commit | c4f24ec9d3a88346e416b11ac47144778aa01696 (patch) | |
| tree | 74955d4f34660dd3e2fd2f7e4114222c5859122b /scripts/embedded_scripts | |
| parent | e06df64f035f613829a00f2611242b83549ba0a4 (diff) | |
| download | busybox-w32-c4f24ec9d3a88346e416b11ac47144778aa01696.tar.gz busybox-w32-c4f24ec9d3a88346e416b11ac47144778aa01696.tar.bz2 busybox-w32-c4f24ec9d3a88346e416b11ac47144778aa01696.zip | |
libbb: try to mitigate 'cat /dev/urandom'
Now that '/dev/urandom' can be used directly, people with a sense
of curiosity and adventure have tried running 'cat /dev/urandom'
or 'cat </dev/urandom'.
The 'cat' applet in BusyBox is so efficient and ANSI escape
handling is so inefficient that this overwhelms the capabilities
of the Windows console or terminal to the extent that it's unable
to process Ctrl-C requests in a timely manner.
To give it a chance to catch up, force 'cat' to take a short nap
from time to time (very short, zero length) but only when it's
writing to a tty.
The call to Sleep() is in a separate function to avoid unnecessary
bloat in 32-bit builds, where its presence upsets the stack and
requires much larger code for stack access.
Adds 48 bytes.
(GitHub issue #585)
Diffstat (limited to 'scripts/embedded_scripts')
0 files changed, 0 insertions, 0 deletions
