-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
fix: webpack-dev-server doesn't exit on Ctrl+C #6741
base: dev
Are you sure you want to change the base?
Conversation
@sodatea We are currently using vue cli5 in our company and there is a lot of questions on this issue |
But I've configured |
I have tried this method and it does not work 👇 |
You can do a simple test with this project, which will only take about 1min |
On my machine, Ctrl + C works if the build is finished. |
OK, Thank you for your reply From the feedback I've gotten so far, All users in
I would using |
Can you please merge this ASAP? It's really annoy. And if you kill -9 the node process, terminal cursor disappear. |
Please first provide a reproduction that I can reproduce the issue with. |
I think I may have found the actual cause of this issue:
Please make sure you are using yarn > 1.22.11 |
It can't be yarn, I get this issue when using npm 7.20.3 on Ubuntu in WSL2. |
I have the same question, eg: As can be seen in the recorded figure, Pressing Control + C for the first time will not exit immediately. Although the program has been terminated, the terminal will not exit the program until pressing Control + C for the second time. yarn v1.22.19 It seems that it only appears when there are a large number of modules, and a simple demo will not reappear. |
fix(cli-service): webpack-dev-server doesn't exit on Ctrl+C
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
Other information
1.background
We need to execute
ctrl +c
twice to stop theyarn serve
This is unbearable for developers
2.reproduction repo
vue-cli-5-mini-repo
3.webpack-dev-server issue
webpack-dev-server
cannot be killed when spawned withchild_process
webpack/webpack-dev-server#21684.solutions
Usually Ctrl-C is interpreted as a
SIGINT
signal, And the termination of a process is interpreted as aSIGTERM
signalSo we need to exit the child process when these two signals are thrown