summaryrefslogtreecommitdiff
path: root/lib/cluster.js
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2015-01-12 14:07:55 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2015-01-12 18:31:29 +0100
commit11c1bae734dae3a017f2c4f3f71b5e679a9ddfa6 (patch)
treed9f7f442caba0588e4e7a07798fce1602460549b /lib/cluster.js
parent5ec5fd83d442e14ad39d8e13092ebb681188d1ed (diff)
downloadandroid-node-v8-11c1bae734dae3a017f2c4f3f71b5e679a9ddfa6.tar.gz
android-node-v8-11c1bae734dae3a017f2c4f3f71b5e679a9ddfa6.tar.bz2
android-node-v8-11c1bae734dae3a017f2c4f3f71b5e679a9ddfa6.zip
lib: make --debug-port work with cluster
Make the cluster module intercept the `--debug-port=<port>` command line switch and replace it with the debug port of the child process. A happy coincidence of this change is that it finally makes it possible to run the sequential/test-debug-signal-cluster in parallel, it now no longer needs the default port numbers. PR-URL: https://github.com/iojs/io.js/pull/306 Reviewed-By: Miroslav Bajtoš <miroslav@strongloop.com>
Diffstat (limited to 'lib/cluster.js')
-rw-r--r--lib/cluster.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cluster.js b/lib/cluster.js
index ba13daadbc..97a4eb456b 100644
--- a/lib/cluster.js
+++ b/lib/cluster.js
@@ -308,7 +308,7 @@ function masterInit() {
workerEnv.NODE_UNIQUE_ID = '' + id;
for (var i = 0; i < execArgv.length; i++) {
- var match = execArgv[i].match(/^(--debug|--debug-brk)(=\d+)?$/);
+ var match = execArgv[i].match(/^(--debug|--debug-(brk|port))(=\d+)?$/);
if (match) {
execArgv[i] = match[1] + '=' + debugPort;