@mcpher/gas-fakes 1.1.6 → 1.1.7

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/package.json CHANGED
@@ -65,7 +65,7 @@
65
65
  "pub": "npm publish --access public"
66
66
  },
67
67
  "name": "@mcpher/gas-fakes",
68
- "version": "1.1.6",
68
+ "version": "1.1.7",
69
69
  "license": "MIT",
70
70
  "main": "main.js",
71
71
  "description": "A proof of concept implementation of Apps Script Environment on Node",
@@ -95,8 +95,11 @@ function cleanup() {
95
95
  console.log('...terminating worker thread');
96
96
  worker.terminate();
97
97
  }
98
+
99
+ // The 'exit' event is for when the process is already shutting down normally.
98
100
  process.on('exit', cleanup);
99
- process.on('SIGINT', cleanup); // Catches Ctrl+C
101
+ // By not listening for 'SIGINT', we allow Node.js to perform its default action,
102
+ // which is to exit the process. The 'exit' event will then be fired to clean up the worker.
100
103
  process.on('SIGTERM', cleanup); // Catches `kill`
101
104
 
102
105
  /**