open-cli-tools / open-cli-tools/concurrently
`killOthers` won't fully terminate others if also `restartTries >= 1`
Open
Nobody has claimed this yet.
pull request welcome
- Dominant language
- TypeScript
- Stars
- 7.9k
- Forks
- 281
- Avg merge
- 17h 12m
- Merged PRs (30d)
- 1
Description
If you use concurrently like:
node_modules/.bin/concurrently 'node foo.js 0' 'node foo.js 1' --kill-others --restart-tries 2
// foo.js - test script, `node foo.js 0` dies after 100ms, `node foo.js 1` stays alive
const id = process.argv[2];
console.log(`Hello world from id ${id}`);
if (id === '0') { setTimeout(() => { process.exit(1) }, 100) /* kill id 0 */ }
else { setTimeout(() => {}, 99999999) /* keep id 1 alive */ }
What happens:
It restarts process 0 twice, then runs the kill-others command. But the kill other is catched by another retry.
What I expected
if restart-tries has been exhausted, then kill-others should tear down the rest for good.
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 by reproducing the issue with the provided concurrently command and foo.js script, then trace how --kill-others interacts with --restart-tries after the retries are exhausted. Done means that, once restart-tries is exhausted, kill-others terminates the remaining process and no retry revives it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100