Skip to content

Commit

Permalink
cluster: remove debug arg handling
Browse files Browse the repository at this point in the history
--debug and --debug-brk are no longer valid flags so remove special
handling for them in the cluster module. Even if they are restored, they
will be aliases for inspect and will not use the legacy debug protocol,
so the special handling will not be needed.

PR-URL: #12738
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
Trott committed May 2, 2017
1 parent 9d723e8 commit dc3bbb4
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions lib/internal/cluster/master.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,8 @@ cluster.setupMaster = function(options) {
assert(schedulingPolicy === SCHED_NONE || schedulingPolicy === SCHED_RR,
`Bad cluster.schedulingPolicy: ${schedulingPolicy}`);

const hasDebugArg = process.execArgv.some((argv) => {
return /^(--debug|--debug-brk)(=\d+)?$/.test(argv);
});

process.nextTick(setupSettingsNT, settings);

// Send debug signal only if not started in debug mode, this helps a lot
// on windows, because RegisterDebugHandler is not called when node starts
// with --debug.* arg.
if (hasDebugArg)
return;

process.on('internalMessage', (message) => {
if (message.cmd !== 'NODE_DEBUG_ENABLED')
return;
Expand Down

0 comments on commit dc3bbb4

Please sign in to comment.