|
|
@ -7,8 +7,13 @@ exports.port = 5858; |
|
|
|
|
|
|
|
exports.start = function () { |
|
|
|
startInterface(); |
|
|
|
|
|
|
|
process.on('exit', function () { |
|
|
|
if (child) child.kill(); |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
var child; |
|
|
|
var c; |
|
|
|
var term; |
|
|
|
|
|
|
@ -18,13 +23,11 @@ function trySpawn(cb) { |
|
|
|
|
|
|
|
console.log(args); |
|
|
|
|
|
|
|
var child = spawn(process.execPath, args, { |
|
|
|
customFds: [0, 1, 2] |
|
|
|
}); |
|
|
|
child = spawn(process.execPath, args, { customFds: [0, 1, 2] }); |
|
|
|
|
|
|
|
setTimeout(function () { |
|
|
|
tryConnect(cb); |
|
|
|
}, 1000); |
|
|
|
}, 100); |
|
|
|
} |
|
|
|
|
|
|
|
function tryConnect(cb) { |
|
|
@ -384,7 +387,11 @@ function startInterface() { |
|
|
|
tryQuit(); |
|
|
|
|
|
|
|
} else if (/^r(un)?/.test(cmd)) { |
|
|
|
trySpawn(); |
|
|
|
trySpawn(function () { |
|
|
|
c.reqContinue(function (res) { |
|
|
|
// Wait for break point. (disable raw mode?)
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} else if (/^help/.test(cmd)) { |
|
|
|
console.log(helpMessage); |
|
|
|