Add an option to change and remove the stop signal send interval
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
When you run a pm2 stop or pm2 delete, the process will try to send a SIGINT signal every 100ms, this is hard-coded here:
This interval should be optional (only one signal send and then wait) and configurable, has for the kill timeout option on the ecosystem.json file.
For my concrete case, I want the process to finish his job properly before quit. There are some sub-processes at the end of my script that can't handle the SIGINT.
There is absolutely no need for me to send a bunch of signals.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/God/Methods.js at the linked stop-signal interval around lines 163-172, then inspect how the kill timeout option is configured in ecosystem.json. Add the requested configurable interval and verify that pm2 stop and pm2 delete can send one signal and wait, or use the configured interval.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100