mirror of
https://github.com/bodyrep/DemoApp.git
synced 2026-01-25 14:43:00 +00:00
21 lines
886 B
Diff
21 lines
886 B
Diff
diff --git a/lib/supervisor.js b/lib/supervisor.js
|
|
index ae69a2d..6c2c795 100644
|
|
--- a/lib/supervisor.js
|
|
+++ b/lib/supervisor.js
|
|
@@ -187,6 +187,7 @@ function startProgram (prog, exec) {
|
|
util.debug("Starting child process with '" + exec + " " + prog.join(" ") + "'");
|
|
crash_queued = false;
|
|
var child = exports.child = spawn(exec, prog);
|
|
+ util.debug("Spawned child process: " + child.pid);
|
|
child.stdout.addListener("data", function (chunk) { chunk && util.print(chunk); });
|
|
child.stderr.addListener("data", function (chunk) { chunk && util.debug(chunk); });
|
|
child.addListener("exit", function (code) {
|
|
@@ -210,6 +211,7 @@ function crash () {
|
|
setTimeout(function() {
|
|
if (child) {
|
|
util.debug("crashing child");
|
|
+ util.debug("Crashing child process: " + child.pid);
|
|
process.kill(child.pid);
|
|
} else {
|
|
util.debug("restarting child");
|