mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Merge branch 'master' into extension-viewlet
This commit is contained in:
15
src/bootstrap.js
vendored
15
src/bootstrap.js
vendored
@@ -111,4 +111,19 @@ process.on('uncaughtException', function (err) {
|
||||
}
|
||||
});
|
||||
|
||||
// Kill oneself if one's parent dies. Much drama.
|
||||
if (process.env['VSCODE_PARENT_PID']) {
|
||||
const parentPid = Number(process.env['VSCODE_PARENT_PID']);
|
||||
|
||||
if (typeof parentPid === 'number' && !isNaN(parentPid)) {
|
||||
setInterval(function () {
|
||||
try {
|
||||
process.kill(parentPid, 0); // throws an exception if the main process doesn't exist anymore.
|
||||
} catch (e) {
|
||||
process.exit();
|
||||
}
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
require('./bootstrap-amd').bootstrap(process.env['AMD_ENTRYPOINT']);
|
||||
Reference in New Issue
Block a user