concurrently icon indicating copy to clipboard operation
concurrently copied to clipboard

--kill-others should work with --success

Open ianpatton opened this issue 2 years ago • 6 comments

  • Description: Using --kill-others to top a process causes it to exit with a non zero exit code. --success specifies that if one process exits cleanly, then concurrently should exit cleanly. It does not.
  • Expected Behavior: concurrently should exit with code 0
  • Environment: MacOS
  • Reproduction: concurrently --kill-others -s last "process-that-doesnt-exit" "tests-that-exit-cleanly"

ianpatton avatar Feb 17 '23 18:02 ianpatton

I have a similar issue I believe

I am using the package to run my integration tests. It does two things

  1. start the webpack dev server
  2. run the jest tests against it

Tests run successfully and exit with 0, that in turn triggers the SIGTERM being sent to other processes (as shown in the logs) but the exit code sent to the process on windows is 1 while it is SIGTERM on mac.

We rely on SIGTERM to do some clean-up but because of the way it exits right now, we are unable to do so only on windows.

On Windows - image

On Mac - image

40x avatar Feb 23 '23 09:02 40x

  • Reproduction: concurrently --kill-others -s last "process-that-doesnt-exit" "tests-that-exit-cleanly"

I could suggest trying to change "last" to "first".

andy265 avatar Mar 09 '23 22:03 andy265

@andy265 it's not working. @dmidnight Is there any update on this issue?

HoneyQumo avatar May 10 '23 13:05 HoneyQumo

What @andy265 said is right. --success last refers to the last command to exit, not the last listed command.

@HoneyQumo can you provide any details about what's not working? If I don't have reproduction steps, I can't help.

gustavohenke avatar Jul 06 '23 12:07 gustavohenke

@40x it might be better to open a new issue for your use case. Windows wouldn't have signals, and so tailoring the experience for "exit code 1, but because it was 'interrupted'" is not possible; the process could have sent a different code.

gustavohenke avatar Jul 06 '23 12:07 gustavohenke

What @andy265 said is right. --success last refers to the last command to exit, not the last listed command.

@HoneyQumo can you provide any details about what's not working? If I don't have reproduction steps, I can't help.

Just a suggestion, complement the documentation with this observation. The description of param are not clear and there are no examples to --success param.

manoelaog avatar Oct 04 '23 22:10 manoelaog