We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f039c1d commit f30a9baCopy full SHA for f30a9ba
lib/supervisor.js
@@ -61,6 +61,19 @@ function run (args) {
61
executor = (programExt === "coffee") ? "coffee" : "node";
62
}
63
64
+ // handle case where the supervisor is backgrounded and a SIGTERM is sent
65
+ // to it, kill the child. Otherwise the child proc keeps running.
66
+ // This does NOT work with SIGKILL.
67
+ process.on('SIGTERM', function () {
68
+ util.debug("About to exit.");
69
+ var child = exports.child;
70
+ if (child) {
71
+ util.debug("Crashing child...");
72
+ process.kill(child.pid);
73
+ }
74
+ process.exit();
75
+ });
76
+
77
util.puts("")
78
util.debug("Running node-supervisor with");
79
util.debug(" program '" + program.join(" ") + "'");
0 commit comments