fork_worker: factor out synced worker output mirroring