Repository navigation
fix(@angular/cli): stop ng serve on first Ctrl+C received - #9668
Conversation
filipesilva
left a comment
There was a problem hiding this comment.
I did see something on the sort, with --aot only. But I don't know why it happens.
We can't do process.exit() though, as the process might need to exit some other way, or remain running because it's being composed with other code.
This needs to be investigated a bit further... I don't know if there is a bug with the current changes, or if there's something retaining the ngc compiler up.
|
@filipesilva Fare enough. I'll take a look tomorrow and see if I can figure out what's the real cause of the issue. |
|
@filipesilva for the record, please take a look at #9647 (and other related bugs there) because it is not just a question of hitting ctrl+C twice to close the process: when used in conjunction with yarn or npm the process stays open and it makes angular-cli simply impossible to use. |
|
@victornoel The issue being fixed here is the root cause of all effects described in the linked issue.
Okey, I'm just tired at the end of the day. Obviously if @filipesilva I think the right fix is to not handle SIGINT in the compiler plugin, but handle only |
072da7a to
111c78d
Compare
|
FWIW if I remove all cleanup logic it correctly terminates child type checker process on macOS, when parent process is terminated. Can somebody test it on Windows as well? |
b221548 to
0b88f7f
Compare
filipesilva
left a comment
There was a problem hiding this comment.
@devoto13 I think your fix is good and tested it in a couple of different systems.
Running both npm start and ng serve and then killing them via ctrl+c resulted in no leftover processes in both win10+node8.9 and osx+node6 (thanks @Foxandxss!).
I have to ask you to still keep treeKill though, as killing processes on windows is harder than on OSX/Linux, and that's what treeKill is there for.
Other than that, LGTM. Do you have time to make those changes today? I would like to get this fix into the next release.
|
@filipesilva Yes, I'll do it right away! |
|
Awesome work @devoto13, I'll add it to the list for the next release! |
|
@maxime1992 oh that's nice! |
|
‘killall ng’ works well too :)
On Thu, 15 Mar 2018 at 10:41 pm, Filipe Silva ***@***.***> wrote:
@maxime1992 <https://github.com/maxime1992> oh that's nice!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9668 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAsCad-vs8rCh9p4kEStFnTtavMhu61Jks5teu4JgaJpZM4SJbld>
.
--
Zak Henry
|
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This fixes a regression introduced in 1ce4db6. Tested manually on macOS:
Before:
After:
Fixes #9647