@@ -23,7 +23,7 @@ import * as watchdog from 'native-watchdog';
import*asglobfrom'vs/base/common/glob';
// const nativeExit = process.exit.bind(process);
functionpatchExit(allowExit:boolean){
functionpatchProcess(allowExit:boolean){
process.exit=function(code){
if(allowExit){
exit(code);
...
...
@@ -32,6 +32,11 @@ function patchExit(allowExit: boolean) {
console.warn(err.stack);
}
};
process.crash=function(){
consterr=newError('An extension called process.crash() and this was prevented.');
console.warn(err.stack);
};
}
exportfunctionexit(code?:number){
//nativeExit(code);
...
...
@@ -73,7 +78,7 @@ export class ExtensionHostMain {
this._workspace=initData.workspace;
constallowExit=!!this._environment.extensionTestsPath;// to support other test frameworks like Jasmin that use process.exit (https://github.com/Microsoft/vscode/issues/37708)