Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I've introduced a bug with memory watching in development in this PR: #53523. Specifically when calling `cleanup` the process would exit because the `exit` listener on the childprocess would be called which then calls `process.exit(0)`. This caused a condition where calling `worker.end()` would immediately quit the process. This PR ensures the cleanup listeners for childprocess are disabled (`.off(`) so that when we call `worker.end()` the process is terminated without the main process being terminated.
- Loading branch information