diff options
author | Ali Ijaz Sheikh <ofrobots@google.com> | 2017-02-14 13:24:37 -0800 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-02-19 12:55:36 -0800 |
commit | 389b9e484d1c80e91fdffdc13eb624db49c0ce5d (patch) | |
tree | 3b287ace6a194adcfbbce180c85b43c96793f483 | |
parent | c090ca816046241658a576d97e28d529a5daf493 (diff) | |
download | node-new-389b9e484d1c80e91fdffdc13eb624db49c0ce5d.tar.gz |
cluster: properly handle --inspect-{brk,port}
PR-URL: https://github.com/nodejs/node/pull/11386
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Josh Gavant <josh.gavant@outlook.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
-rw-r--r-- | lib/internal/cluster/master.js | 2 | ||||
-rw-r--r-- | test/parallel/test-cluster-inspector-debug-port.js | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/internal/cluster/master.js b/lib/internal/cluster/master.js index 9d5062f542..97a7138174 100644 --- a/lib/internal/cluster/master.js +++ b/lib/internal/cluster/master.js @@ -115,7 +115,7 @@ function createWorkerProcess(id, env) { for (var i = 0; i < execArgv.length; i++) { const match = execArgv[i].match( - /^(--inspect|--debug|--debug-(brk|port))(=\d+)?$/ + /^(--inspect|--inspect-(brk|port)|--debug|--debug-(brk|port))(=\d+)?$/ ); if (match) { diff --git a/test/parallel/test-cluster-inspector-debug-port.js b/test/parallel/test-cluster-inspector-debug-port.js index 0adb6d2a2b..f2f8db9b5d 100644 --- a/test/parallel/test-cluster-inspector-debug-port.js +++ b/test/parallel/test-cluster-inspector-debug-port.js @@ -27,6 +27,8 @@ if (cluster.isMaster) { fork(4, ['--inspect', '--debug']); fork(5, [`--debug=${debuggerPort}`, '--inspect']); fork(6, ['--inspect', `--debug-port=${debuggerPort}`]); + fork(7, [`--inspect-port=${debuggerPort}`]); + fork(8, ['--inspect', `--inspect-port=${debuggerPort}`]); } else { const hasDebugArg = process.execArgv.some(function(arg) { return /inspect/.test(arg); |