Skip to content
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

CTRL+C does not kill underlying nodejs server #339

Open
Globegitter opened this issue Jul 1, 2019 · 4 comments
Open

CTRL+C does not kill underlying nodejs server #339

Globegitter opened this issue Jul 1, 2019 · 4 comments

Comments

@Globegitter
Copy link

Globegitter commented Jul 1, 2019

I am having a simple app created with https://github.com/facebook/create-react-app that I am using with this plugin. To start it I am running gradle yarn_run_start which starts a nodejs dev server with hot module reload etc. That all works fine, but when I exit out of it via CTRL+C and then later start the server again it reproducibly complains that the port is still open, i.e. the server was not killed through CTRL+C - I suppose SIGINT is not propagated correctly? Is there a way to make sure this happens?

@nahue
Copy link

nahue commented Oct 1, 2019

Any ideas? i can work on a solution but i dont know where to start looking.

@mmayer1
Copy link

mmayer1 commented Oct 3, 2019

May just be a generic gradle issue with no good solution (other than maybe using --no-daemon flag)
https://discuss.gradle.org/t/exec-task-and-killing-processes/6189
a docker plugin has same issue as well
gradle/gradle#8025

@nahue
Copy link

nahue commented Oct 3, 2019

Indeed.. adding --no-daemon solves the issue. It seems that the node server thread is managed by the gradle daemon.. and stopping the task is not enough to kill it

@rsampaths16
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants