Skip to content

fix: the concurrently command does not close all related processes on exit signal (CTRL + C) #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ciaro
Copy link

@Ciaro Ciaro commented Apr 23, 2025

Context

When running composer run dev, the concurrently package is used to start multiple processes in one terminal. This is a great addition to the Laravel starter kits! However, when sending the EXIT signal (CTRL + C) only the last process in the configured list is closed.

Resolution

By adding the --kill-others option to the command, all the related processes are closed. This PR adds this option to both the concurrently references in the composer.json file.

I would add this flag in by default, as the current behaviour is most likely unintended. For example, in case you are switching projects and need the ports released for re-use, you now need to manually find the other processes and close them yourself.

New output

afbeelding

@Ciaro Ciaro changed the title fix: the concurrently command did not close all related processed on exit signal (CTRL + C) fix: the concurrently command did not close all related processes on exit signal (CTRL + C) Apr 23, 2025
@Ciaro Ciaro changed the title fix: the concurrently command did not close all related processes on exit signal (CTRL + C) fix: the concurrently command does not close all related processes on exit signal (CTRL + C) Apr 23, 2025
@tnylea
Copy link
Contributor

tnylea commented Apr 25, 2025

excellent, can you add this PR to the React and Livewire starter kits as well.

Thanks!

@tnylea tnylea added the Approved Approved for merge label Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Approved for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants