Skip to content

Cancel a series of tasks with SIGINT #452

@bozdoz

Description

@bozdoz

Description:

I want to run a series of tasks, that are cancellable.

Expected Behaviour:

If I press CTRL-C, I want the entire script (each of the series of tasks) to be aborted (or not started).

Actual Behaviour:

I need to press CTRL-C multiple times to cancel each process.

Reproduction:

Note the -m 1 flag to run one process consecutively.

{
"sleep": "concurrently --kill-others-on-fail -m 1 \"sleep 3\" \"echo 'hi'\" \"sleep 3\" \"echo 'there'\" \"sleep 3\" \"echo 'buddy'\""
}
npm run sleep

> concurrently --kill-others-on-fail -m 1 "sleep 3" "echo 'hi'" "sleep 3" "echo 'there'" "sleep 3" "echo 'buddy'"

^C[0] sleep 3 exited with code SIGINT
[1] hi
[1] echo 'hi' exited with code 0
[2] sleep 3 exited with code 0
[3] there
[3] echo 'there' exited with code 0
[4] sleep 3 exited with code 0
[5] buddy
[5] echo 'buddy' exited with code 0

Is this a bug, or is there a way to do this that is not obvious?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions