Fix race condition in tests/bugs/signals.sh.