@@ -12,7 +12,6 @@ import * as paths from 'vs/base/common/paths';
1212import * as strings from 'vs/base/common/strings' ;
1313import * as objects from 'vs/base/common/objects' ;
1414import * as platform from 'vs/base/common/platform' ;
15- import * as stdfork from 'vs/base/node/stdFork' ;
1615import { Emitter , Event } from 'vs/base/common/event' ;
1716import { TPromise } from 'vs/base/common/winjs.base' ;
1817import { ExtensionsChannelId } from 'vs/platform/extensionManagement/common/extensionManagement' ;
@@ -285,13 +284,14 @@ export class DebugAdapter extends StreamDebugAdapter {
285284
286285 if ( this . adapterExecutable . command === 'node' && this . outputService ) {
287286 if ( Array . isArray ( this . adapterExecutable . args ) && this . adapterExecutable . args . length > 0 ) {
288- stdfork . fork ( this . adapterExecutable . args [ 0 ] , this . adapterExecutable . args . slice ( 1 ) , { } , ( err , child ) => {
289- if ( err ) {
290- e ( new Error ( nls . localize ( 'unableToLaunchDebugAdapter' , "Unable to launch debug adapter from '{0}'." , this . adapterExecutable . args [ 0 ] ) ) ) ;
291- }
292- this . serverProcess = child ;
293- c ( null ) ;
287+ const child = cp . fork ( this . adapterExecutable . args [ 0 ] , this . adapterExecutable . args . slice ( 1 ) , {
288+ stdio : [ 'pipe' , 'pipe' , 'pipe' , 'ipc' ]
294289 } ) ;
290+ if ( ! child . pid ) {
291+ e ( new Error ( nls . localize ( 'unableToLaunchDebugAdapter' , "Unable to launch debug adapter from '{0}'." , this . adapterExecutable . args [ 0 ] ) ) ) ;
292+ }
293+ this . serverProcess = child ;
294+ c ( null ) ;
295295 } else {
296296 e ( new Error ( nls . localize ( 'unableToLaunchDebugAdapterNoArgs' , "Unable to launch debug adapter." ) ) ) ;
297297 }
0 commit comments