diff --git a/doc/api/cli.md b/doc/api/cli.md index 2960055468c47a..df24e99a34c58b 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -174,19 +174,18 @@ node:internal/child_process:388 ^ Error: Access to this API has been restricted at ChildProcess.spawn (node:internal/child_process:388:28) - at Object.spawn (node:child_process:723:9) - at Object. (/home/index.js:3:14) - at Module._compile (node:internal/modules/cjs/loader:1120:14) - at Module._extensions..js (node:internal/modules/cjs/loader:1174:10) - at Module.load (node:internal/modules/cjs/loader:998:32) - at Module._load (node:internal/modules/cjs/loader:839:12) - at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47 { code: 'ERR_ACCESS_DENIED', permission: 'ChildProcess' } ``` +Unlike `child_process.spawn`, the `child_process.fork` API copies the execution +arguments from the parent process. This means that if you start Node.js with the +Permission Model enabled and include the `--allow-child-process` flag, calling +`child_process.fork()` will propagate all Permission Model flags to the child +process. + ### `--allow-fs-read`