@@ -70,10 +70,10 @@ exports._forkChild = function(fd) {
70
70
p . open ( fd ) ;
71
71
p . unref ( ) ;
72
72
const control = setupChannel ( process , p ) ;
73
- process . on ( 'newListener' , function ( name ) {
73
+ process . on ( 'newListener' , function onNewListener ( name ) {
74
74
if ( name === 'message' || name === 'disconnect' ) control . ref ( ) ;
75
75
} ) ;
76
- process . on ( 'removeListener' , function ( name ) {
76
+ process . on ( 'removeListener' , function onRemoveListener ( name ) {
77
77
if ( name === 'message' || name === 'disconnect' ) control . unref ( ) ;
78
78
} ) ;
79
79
} ;
@@ -247,7 +247,7 @@ exports.execFile = function(file /*, args, options, callback*/) {
247
247
}
248
248
249
249
if ( options . timeout > 0 ) {
250
- timeoutId = setTimeout ( function ( ) {
250
+ timeoutId = setTimeout ( function delayedKill ( ) {
251
251
kill ( ) ;
252
252
timeoutId = null ;
253
253
} , options . timeout ) ;
@@ -257,7 +257,7 @@ exports.execFile = function(file /*, args, options, callback*/) {
257
257
if ( encoding )
258
258
child . stdout . setEncoding ( encoding ) ;
259
259
260
- child . stdout . addListener ( 'data' , function ( chunk ) {
260
+ child . stdout . on ( 'data' , function onChildStdout ( chunk ) {
261
261
stdoutLen += encoding ? Buffer . byteLength ( chunk , encoding ) : chunk . length ;
262
262
263
263
if ( stdoutLen > options . maxBuffer ) {
@@ -276,7 +276,7 @@ exports.execFile = function(file /*, args, options, callback*/) {
276
276
if ( encoding )
277
277
child . stderr . setEncoding ( encoding ) ;
278
278
279
- child . stderr . addListener ( 'data' , function ( chunk ) {
279
+ child . stderr . on ( 'data' , function onChildStderr ( chunk ) {
280
280
stderrLen += encoding ? Buffer . byteLength ( chunk , encoding ) : chunk . length ;
281
281
282
282
if ( stderrLen > options . maxBuffer ) {
@@ -297,12 +297,14 @@ exports.execFile = function(file /*, args, options, callback*/) {
297
297
return child ;
298
298
} ;
299
299
300
- var _deprecatedCustomFds = internalUtil . deprecate ( function ( options ) {
301
- options . stdio = options . customFds . map ( function ( fd ) {
302
- return fd === - 1 ? 'pipe' : fd ;
303
- } ) ;
304
- } , 'child_process: options.customFds option is deprecated. ' +
305
- 'Use options.stdio instead.' ) ;
300
+ const _deprecatedCustomFds = internalUtil . deprecate (
301
+ function deprecateCustomFds ( options ) {
302
+ options . stdio = options . customFds . map ( function mapCustomFds ( fd ) {
303
+ return fd === - 1 ? 'pipe' : fd ;
304
+ } ) ;
305
+ } , 'child_process: options.customFds option is deprecated. ' +
306
+ 'Use options.stdio instead.'
307
+ ) ;
306
308
307
309
function _convertCustomFds ( options ) {
308
310
if ( options . customFds && ! options . stdio ) {
0 commit comments