Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
child_process: reduce internal usage of public require of util
  • Loading branch information
toshi1127 committed Mar 19, 2019
commit 94f666da6c6ef2b20ac26eebb2fc69cb981edf96
13 changes: 8 additions & 5 deletions lib/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@

'use strict';

const util = require('util');
const { convertToValidSignal, getSystemErrorName } = require('internal/util');
const {
promisify,
convertToValidSignal,
getSystemErrorName
} = require('internal/util');
const { isArrayBufferView } = require('internal/util/types');
const debug = util.debuglog('child_process');
const debug = require('internal/util/debuglog').debuglog('child_process');
const { Buffer } = require('buffer');
const { Pipe, constants: PipeConstants } = internalBinding('pipe_wrap');
const {
Expand Down Expand Up @@ -168,7 +171,7 @@ const customPromiseExecFunction = (orig) => {
};
};

Object.defineProperty(exports.exec, util.promisify.custom, {
Object.defineProperty(exports.exec, promisify.custom, {
enumerable: false,
value: customPromiseExecFunction(exports.exec)
});
Expand Down Expand Up @@ -389,7 +392,7 @@ exports.execFile = function execFile(file /* , args, options, callback */) {
return child;
};

Object.defineProperty(exports.execFile, util.promisify.custom, {
Object.defineProperty(exports.execFile, promisify.custom, {
enumerable: false,
value: customPromiseExecFunction(exports.execFile)
});
Expand Down