Kill processes in another thread

Run the test with 'sleep'.