diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 1b9fc0229ab389..16e88401e4d7bb 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -280,7 +280,7 @@ changes: `'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different shell can be specified as a string. See [Shell requirements][] and [Default Windows shell][]. **Default:** `false` (no shell). - * `signal` {AbortSignal} allows aborting the execFile using an AbortSignal + * `signal` {AbortSignal} allows aborting the execFile using an AbortSignal. * `callback` {Function} Called with the output when process terminates. * `error` {Error} * `stdout` {string|Buffer} @@ -344,7 +344,7 @@ const { signal } = controller; const child = execFile('node', ['--version'], { signal }, (error) => { console.log(error); // an AbortError }); -signal.abort(); +controller.abort(); ``` ### `child_process.fork(modulePath[, args][, options])` @@ -424,6 +424,9 @@ The `shell` option available in [`child_process.spawn()`][] is not supported by