@@ -24,12 +24,24 @@ if (process.argv[2] === 'child') {
2424 code : 'ERR_ACCESS_DENIED' ,
2525 permission : 'ChildProcess' ,
2626 } ) ) ;
27+ assert . throws ( ( ) => {
28+ childProcess . spawnSync ( process . execPath , [ '--version' ] ) ;
29+ } , common . expectsError ( {
30+ code : 'ERR_ACCESS_DENIED' ,
31+ permission : 'ChildProcess' ,
32+ } ) ) ;
2733 assert . throws ( ( ) => {
2834 childProcess . exec ( process . execPath , [ '--version' ] ) ;
2935 } , common . expectsError ( {
3036 code : 'ERR_ACCESS_DENIED' ,
3137 permission : 'ChildProcess' ,
3238 } ) ) ;
39+ assert . throws ( ( ) => {
40+ childProcess . execSync ( process . execPath , [ '--version' ] ) ;
41+ } , common . expectsError ( {
42+ code : 'ERR_ACCESS_DENIED' ,
43+ permission : 'ChildProcess' ,
44+ } ) ) ;
3345 assert . throws ( ( ) => {
3446 childProcess . fork ( __filename , [ 'child' ] ) ;
3547 } , common . expectsError ( {
@@ -42,4 +54,10 @@ if (process.argv[2] === 'child') {
4254 code : 'ERR_ACCESS_DENIED' ,
4355 permission : 'ChildProcess' ,
4456 } ) ) ;
57+ assert . throws ( ( ) => {
58+ childProcess . execFileSync ( process . execPath , [ '--version' ] ) ;
59+ } , common . expectsError ( {
60+ code : 'ERR_ACCESS_DENIED' ,
61+ permission : 'ChildProcess' ,
62+ } ) ) ;
4563}
0 commit comments