pinokiod 2.14.4 → 2.14.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/kernel/shells.js CHANGED
@@ -197,8 +197,10 @@ class Shells {
197
197
  return this.kill(request, message)
198
198
  }
199
199
  reset() {
200
+ console.log("reset", this.shells)
200
201
  if (this.shells) {
201
202
  for(let shell of this.shells) {
203
+ console.log("[Kill]", shell)
202
204
  shell.kill("", true)
203
205
  }
204
206
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "2.14.4",
3
+ "version": "2.14.6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -2884,6 +2884,21 @@ class Server {
2884
2884
  stack: err.stack
2885
2885
  })
2886
2886
  });
2887
+ process.on('SIGINT', () => {
2888
+ console.log("SIGINT Event")
2889
+ if (this.kernel && this.kernel.shell) this.kernel.shell.reset()
2890
+ })
2891
+ process.on('SIGTERM', () => {
2892
+ console.log("SIGTERM Event")
2893
+ if (this.kernel && this.kernel.shell) this.kernel.shell.reset()
2894
+ })
2895
+ process.on('exit', () => {
2896
+ console.log("exit Event")
2897
+ if (this.kernel && this.kernel.shell) {
2898
+ console.log("this.kernel.shell.reset")
2899
+ this.kernel.shell.reset()
2900
+ }
2901
+ })
2887
2902
 
2888
2903
 
2889
2904
  // install