@@ -168,7 +168,7 @@ function setupKillAndExit() {
168
168
}
169
169
170
170
if ( err ) {
171
- var errnoException = require ( 'util' ) . _errnoException ;
171
+ const errnoException = require ( 'util' ) . _errnoException ;
172
172
throw errnoException ( err , 'kill' ) ;
173
173
}
174
174
@@ -180,7 +180,7 @@ function setupKillAndExit() {
180
180
function setupSignalHandlers ( ) {
181
181
// Load events module in order to access prototype elements on process like
182
182
// process.addListener.
183
- var signalWraps = { } ;
183
+ const signalWraps = { } ;
184
184
185
185
function isSignal ( event ) {
186
186
return typeof event === 'string' &&
@@ -191,18 +191,18 @@ function setupSignalHandlers() {
191
191
process . on ( 'newListener' , function ( type , listener ) {
192
192
if ( isSignal ( type ) &&
193
193
! signalWraps . hasOwnProperty ( type ) ) {
194
- var Signal = process . binding ( 'signal_wrap' ) . Signal ;
195
- var wrap = new Signal ( ) ;
194
+ const Signal = process . binding ( 'signal_wrap' ) . Signal ;
195
+ const wrap = new Signal ( ) ;
196
196
197
197
wrap . unref ( ) ;
198
198
199
199
wrap . onsignal = function ( ) { process . emit ( type ) ; } ;
200
200
201
- var signum = lazyConstants ( ) [ type ] ;
202
- var err = wrap . start ( signum ) ;
201
+ const signum = lazyConstants ( ) [ type ] ;
202
+ const err = wrap . start ( signum ) ;
203
203
if ( err ) {
204
204
wrap . close ( ) ;
205
- var errnoException = require ( 'util' ) . _errnoException ;
205
+ const errnoException = require ( 'util' ) . _errnoException ;
206
206
throw errnoException ( err , 'uv_signal_start' ) ;
207
207
}
208
208
@@ -223,13 +223,13 @@ function setupChannel() {
223
223
// If we were spawned with env NODE_CHANNEL_FD then load that up and
224
224
// start parsing data from that stream.
225
225
if ( process . env . NODE_CHANNEL_FD ) {
226
- var fd = parseInt ( process . env . NODE_CHANNEL_FD , 10 ) ;
226
+ const fd = parseInt ( process . env . NODE_CHANNEL_FD , 10 ) ;
227
227
assert ( fd >= 0 ) ;
228
228
229
229
// Make sure it's not accidentally inherited by child processes.
230
230
delete process . env . NODE_CHANNEL_FD ;
231
231
232
- var cp = require ( 'child_process' ) ;
232
+ const cp = require ( 'child_process' ) ;
233
233
234
234
// Load tcp_wrap to avoid situation where we might immediately receive
235
235
// a message.
@@ -243,8 +243,8 @@ function setupChannel() {
243
243
244
244
245
245
function setupRawDebug ( ) {
246
- var format = require ( 'util' ) . format ;
247
- var rawDebug = process . _rawDebug ;
246
+ const format = require ( 'util' ) . format ;
247
+ const rawDebug = process . _rawDebug ;
248
248
process . _rawDebug = function ( ) {
249
249
rawDebug ( format . apply ( null , arguments ) ) ;
250
250
} ;
0 commit comments