master: split spawn_worker function