Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d88a9fa

Browse filesBrowse files
daeyeondanielleadams
authored andcommitted
doc: deprecate coercion to integer in process.exit
This warns of invalid uses of process.exit([code]) and recommends the correct practice. Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com PR-URL: #43738 Refs: #43716 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent d7cfd0c commit d88a9fa
Copy full SHA for d88a9fa

File tree

Expand file treeCollapse file tree

1 file changed

+15
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+15
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/deprecations.md‎

Copy file name to clipboardExpand all lines: doc/api/deprecations.md
+15Lines changed: 15 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -3155,6 +3155,20 @@ Use [`diagnostics_channel.subscribe(name, onMessage)`][] or
31553155
[`diagnostics_channel.unsubscribe(name, onMessage)`][] which does the same
31563156
thing instead.
31573157

3158+
### DEP0164: `process.exit([code])` coercion to integer
3159+
3160+
<!-- YAML
3161+
changes:
3162+
- version: REPLACEME
3163+
pr-url: https://github.com/nodejs/node/pull/43738
3164+
description: Documentation-only deprecation.
3165+
-->
3166+
3167+
Type: Documentation-only
3168+
3169+
`code` values other than `undefined`, `null`, integer numbers and integer
3170+
strings (e.g., '1') are deprecated as parameter in [`process.exit()`][].
3171+
31583172
[Legacy URL API]: url.md#legacy-url-api
31593173
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
31603174
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
@@ -3233,6 +3247,7 @@ thing instead.
32333247
[`os.networkInterfaces()`]: os.md#osnetworkinterfaces
32343248
[`os.tmpdir()`]: os.md#ostmpdir
32353249
[`process.env`]: process.md#processenv
3250+
[`process.exit()`]: process.md#processexitcode
32363251
[`process.getActiveResourcesInfo()`]: process.md#processgetactiveresourcesinfo
32373252
[`process.mainModule`]: process.md#processmainmodule
32383253
[`punycode`]: punycode.md

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.