sandbox - enable utility process in insiders by default (#175326)

This commit is contained in:
Benjamin Pasero
2023-02-24 15:41:33 +01:00
committed by GitHub
parent b8dbdd9064
commit ed6bb0790b
10 changed files with 52 additions and 28 deletions
@@ -145,9 +145,14 @@ class SharedProcessMain extends Disposable {
private registerListeners(): void {
// Shared process lifecycle
const onExit = async () => {
this.lifecycleService?.fireOnWillShutdown();
this.dispose();
let didExit = false;
const onExit = () => {
if (!didExit) {
didExit = true;
this.lifecycleService?.fireOnWillShutdown();
this.dispose();
}
};
process.once('exit', onExit);
if (isUtilityProcess(process)) {