@@ -242,6 +242,10 @@ can be used to specify the character encoding used to decode the stdout and
242242stderr output. If ` encoding ` is ` 'buffer' ` , or an unrecognized character
243243encoding, ` Buffer ` objects will be passed to the callback instead.
244244
245+ > Stability: 0 - Deprecated. Using the ` signal ` option to destroy long-lived
246+ > child process resources is documentation-only deprecated. See
247+ > [ DEP0208] ( deprecations.md#dep0208-using-abortsignal-to-dispose-of-resources ) .
248+
245249``` cjs
246250const { exec } = require (' node:child_process' );
247251exec (' cat *.js missing_file | wc -l' , (error , stdout , stderr ) => {
@@ -390,6 +394,10 @@ except that it does not spawn a shell by default. Rather, the specified
390394executable ` file ` is spawned directly as a new process making it slightly more
391395efficient than [ ` child_process.exec() ` ] [ ] .
392396
397+ > Stability: 0 - Deprecated. Using the ` signal ` option to destroy long-lived
398+ > child process resources is documentation-only deprecated. See
399+ > [ DEP0208] ( deprecations.md#dep0208-using-abortsignal-to-dispose-of-resources ) .
400+
393401The same options as [ ` child_process.exec() ` ] [ ] are supported. Since a shell is
394402not spawned, behaviors such as I/O redirection and file globbing are not
395403supported.
@@ -585,6 +593,10 @@ current process.
585593The ` shell ` option available in [ ` child_process.spawn() ` ] [ ] is not supported by
586594` child_process.fork() ` and will be ignored if set.
587595
596+ > Stability: 0 - Deprecated. Using the ` signal ` option to destroy long-lived
597+ > child process resources is documentation-only deprecated. See
598+ > [ DEP0208] ( deprecations.md#dep0208-using-abortsignal-to-dispose-of-resources ) .
599+
588600If the ` signal ` option is enabled, calling ` .abort() ` on the corresponding
589601` AbortController ` is similar to calling ` .kill() ` on the child process except
590602the error passed to the callback will be an ` AbortError ` :
@@ -735,6 +747,10 @@ process, the default is [`process.env`][].
735747
736748` undefined ` values in ` env` will be ignored.
737749
750+ > Stability: 0 - Deprecated. Using the ` signal` option to destroy long-lived
751+ > child process resources is documentation-only deprecated. See
752+ > [DEP0208](deprecations.md#dep0208-using-abortsignal-to-dispose-of-resources).
753+
738754Example of running ` ls - lh / usr` , capturing ` stdout` , ` stderr` , and the
739755exit code:
740756
0 commit comments