reap1.tests 255 B

1234567891011121314
  1. #!/bin/sh
  2. # Must not find us alive
  3. { sleep 2; kill -9 $$; } 2>/dev/null &
  4. sleep 1 &
  5. PID=$!
  6. # We must exit the loop in one second.
  7. # We had bug 5304: builtins never waited for exited children
  8. while kill -0 $PID >/dev/null 2>&1; do
  9. true
  10. done
  11. echo Ok