Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix restarting bot by killing all child processes of bot (#2861)
Calling `child_process.kill()` will kill that process but does not kill all processes spawned by that process. We need to run the bot in a detached process which gets its own process group, then call `process.kill(-child.pid)` to kill all porcesses in that group.
- Loading branch information