@@ -24,12 +24,24 @@ if (process.argv[2] === 'child') {
24
24
code : 'ERR_ACCESS_DENIED' ,
25
25
permission : 'ChildProcess' ,
26
26
} ) ) ;
27
+ assert . throws ( ( ) => {
28
+ childProcess . spawnSync ( process . execPath , [ '--version' ] ) ;
29
+ } , common . expectsError ( {
30
+ code : 'ERR_ACCESS_DENIED' ,
31
+ permission : 'ChildProcess' ,
32
+ } ) ) ;
27
33
assert . throws ( ( ) => {
28
34
childProcess . exec ( process . execPath , [ '--version' ] ) ;
29
35
} , common . expectsError ( {
30
36
code : 'ERR_ACCESS_DENIED' ,
31
37
permission : 'ChildProcess' ,
32
38
} ) ) ;
39
+ assert . throws ( ( ) => {
40
+ childProcess . execSync ( process . execPath , [ '--version' ] ) ;
41
+ } , common . expectsError ( {
42
+ code : 'ERR_ACCESS_DENIED' ,
43
+ permission : 'ChildProcess' ,
44
+ } ) ) ;
33
45
assert . throws ( ( ) => {
34
46
childProcess . fork ( __filename , [ 'child' ] ) ;
35
47
} , common . expectsError ( {
@@ -42,4 +54,10 @@ if (process.argv[2] === 'child') {
42
54
code : 'ERR_ACCESS_DENIED' ,
43
55
permission : 'ChildProcess' ,
44
56
} ) ) ;
57
+ assert . throws ( ( ) => {
58
+ childProcess . execFileSync ( process . execPath , [ '--version' ] ) ;
59
+ } , common . expectsError ( {
60
+ code : 'ERR_ACCESS_DENIED' ,
61
+ permission : 'ChildProcess' ,
62
+ } ) ) ;
45
63
}
0 commit comments