A version that kills the defunct pids as it goes.