diff options
author | Ron Yorston <rmy@pobox.com> | 2017-08-01 19:30:34 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2017-08-01 19:30:34 +0100 |
commit | 2a210715a9a85fb48cf8f636c74e63f54605eedc (patch) | |
tree | 4e9f3a721abfeea361a85405084e3e3d8397f971 /libbb | |
parent | 3269a81ce20fcdc4bfb196f45585a3c632896f05 (diff) | |
download | busybox-w32-2a210715a9a85fb48cf8f636c74e63f54605eedc.tar.gz busybox-w32-2a210715a9a85fb48cf8f636c74e63f54605eedc.tar.bz2 busybox-w32-2a210715a9a85fb48cf8f636c74e63f54605eedc.zip |
ash: improve performance of ctrl-c
The WIN32 port uses a console control handler to detect crtl-c. This
replaces the signal handler used in POSIX. The control handler sets
an event that can be detected in waitpid_child. However this only
works when a wait is in progress, which makes it impossible to
break out of a simple shell loop with ctrl-c:
while true; do
sleep 1
echo hi
done
Better performance can be achieved by setting the pending_int flag in
the control handler, similar to what's done in the signal handler.
The deferred signal is processed in int_on.
Or at least it would be but for a bug in the WIN32 code to handle
shellexec: interrupts weren't being properly turned off and on.
So this had to be fixed too.
Diffstat (limited to 'libbb')
0 files changed, 0 insertions, 0 deletions