diff options
| author | Ron Yorston <rmy@pobox.com> | 2025-06-12 13:15:11 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2025-06-29 14:33:57 +0100 |
| commit | d319b435a49e52a51162ab456cde9a1b103ec299 (patch) | |
| tree | 1087a0ccfeaecd54e7c0b03fa4090623f9473880 /scripts/basic | |
| parent | 7e164c132659f536e7ceae1d22cd1428e91adc51 (diff) | |
| download | busybox-w32-d319b435a49e52a51162ab456cde9a1b103ec299.tar.gz busybox-w32-d319b435a49e52a51162ab456cde9a1b103ec299.tar.bz2 busybox-w32-d319b435a49e52a51162ab456cde9a1b103ec299.zip | |
ash: kill background processes on SIGINT
Consider this script:
#!/bin/sh -e
f() {
for n in $(seq 1 10); do
echo "Background $n ..."
sleep 1
done
}
f 1 &
f 2 &
f 3 &
wait
If this was interrupted by Ctrl+C the background jobs continued to
run. Avoid this by sending SIGINT to all children of the shell.
Saves 16 bytes.
(See GitHub PR #500)
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
