unexpected breaking changes with `process.exitCode`/`process.exit()`
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 122k
- Fork
- 37.3k
- Merge trung bình
- 4 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 283
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách chạy bản tái hiện trên một bản build sau #44711 và so sánh việc xóa process.exitCode với process.exit(undefined). Hoàn tất khi assertion đạt và tiến trình vẫn thoát với mã 2 khi các dòng được đánh dấu bị xóa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, node.js
- Lĩnh vực
- operating-systems
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 38/100