Report terminal crash

This commit is contained in:
Radon Rosborough 2020-07-31 10:18:26 -06:00
parent 559efbdf8f
commit 08225b30eb
1 changed files with 9 additions and 0 deletions

View File

@ -350,6 +350,15 @@ export class Session {
this.send({ event: "terminalOutput", output: data });
}
});
this.term.pty.on("exit", (code, signal) => {
if (term.live) {
this.send({
event: "serviceFailed",
service: "terminal",
error: `Exited with status ${signal || code}`,
});
}
});
} catch (err) {
this.log(`Error while running user code`);
console.log(err);