Skip to content

killOthers won't fully terminate others if also restartTries >= 1  #496

Description

@sod

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.

CleanShot 2024-08-05 at 14 20 10@2x

What I expected

if restart-tries has been exhausted, then kill-others should tear down the rest for good.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions