From 43dc2e69dfa0cbaf960ce6f1bd6c4125b1052ff9 Mon Sep 17 00:00:00 2001 From: Manuel Astudillo Date: Mon, 17 Jan 2022 10:49:54 +0800 Subject: [PATCH] fix(sandbox): exit if uncaughtException --- lib/process/master.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/process/master.js b/lib/process/master.js index 50e905173..25f4f19fc 100644 --- a/lib/process/master.js +++ b/lib/process/master.js @@ -118,7 +118,10 @@ process.on('uncaughtException', err => { cmd: 'failed', value: err }); - throw err; + + // An uncaughException leaves this process in a potentially undetermined state so + // we must exit + process.exit(-1); }); /**