unexpected breaking changes with `process.exitCode`/`process.exit()`
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 122k
- Forks
- 37.3k
- Ø Merge
- 4 T. 2 Std.
- Gemergte PRs (30 T.)
- 283
Beschreibung
Version
20.0.0-pre (nightly)
Platform
Darwin dib.lan 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103 arm64
Subsystem
process
What steps will reproduce the bug?
const assert = require('assert')
process.exitCode = 2
delete process.exitCode // REMOVE
assert(process.exitCode === undefined) // REMOVE
process.exit(undefined)
How often does it reproduce? Is there a required condition?
reproduces on all node versions built after landing #44711
What is the expected behavior?
the assertion should pass, and if the two lines marked REMOVE are commented out the process should exit with code 2
What do you see instead?
the assertion throws, and if the two lines marked REMOVE are commented out the process exits with code 0
Additional information
No response
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die Reproduktion mit einem Build nach #44711 auszuführen und das Löschen von process.exitCode mit process.exit(undefined) zu vergleichen. Erledigt ist es, wenn die Assertion erfolgreich ist und der Prozess weiterhin mit Code 2 beendet wird, sobald die markierten Zeilen entfernt werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, node.js
- Bereich
- operating-systems
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 38/100