-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Description
When the process is killed by the heap limiter, the exit code is incorrectly shown as 0.
Steps to reproduce
Create a test.js
file:
const numbers = [];
for (let i = 0; i < 100000000; i++) {
numbers.push(i);
if (i % 10000 === 0) console.log(i);
}
Execute the following command to trigger the heap limiter:
pm2 start test.js --no-autorestart --no-daemon --node-args="--max-old-space-size=10"
Expected behaviour
The process should exit with SIGABRT signal and a non-zero code (usually 134).
Actual behaviour
The process exits with SIGABRT signal and 0 code. This makes it impossible to determine whether the process exited normally or with an error:

Metadata
Metadata
Assignees
Labels
No labels