-
-
Notifications
You must be signed in to change notification settings - Fork 72
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: stop command not working on Windows OS #313
fix: stop command not working on Windows OS #313
Conversation
Draft because tests need to be fixed, also I don't really like this solution because it looks like |
@L2jLiga Thanks so much for submitting this PR! Quick note—SIGTERM is also sent during system shutdowns or reboots. If I’m understanding correctly, with the current implementation, shutdown() wouldn’t be called in those situations, so the config file wouldn’t be properly removed. This could cause unexpected behavior when the system restarts and eslint_d is used again, as we've noticed in our observations. |
That's correct, but I don't see big problem here because eslint_d checks if config is outdated before forward command to daemon: Lines 56 to 67 in 2528299
But it can break Lines 33 to 39 in 2528299
@mantoni wdyt? should we adjust start command to handle such case? Or am I missing something and it's already handled? |
Hey, thank you for contributing! I'm a little puzzled though since the node docs say that |
Sure,
This actually means that process will be just force-killed and it will never receive "SIGTERM" event here: Line 46 in 2528299
hence this code won't be called: Lines 74 to 93 in 2528299
and hence this promise never resolved: Line 55 in 2528299
that's why |
Thank you for the detailed explanation. I think your proposed solution is fine, and the "hack" of using the color parameter is fine with me.
This is only partially true. Outdated config means that the When Lines 93 to 101 in 2528299
This cleans up the config and a subsequent invocation will then start the daemon again. However, the first invocation will fail. To make
You're right, the |
b12db8b
to
04bccdb
Compare
c9a8bab
to
54bda67
Compare
54bda67
to
612d883
Compare
612d883
to
f52acd6
Compare
@mantoni I've added/updated tests. We can try to increase integration tests timeout to solve most of instability issues, but time-to-time they fail for weird reasons |
I think it should go in separate PR/commit |
I've disabled integration tests on Windows, CI is green now 😄 |
Hi @mantoni , any comments on this? |
📦 Released in Sorry for the long wait. I've been under water at work. I added test coverage in #314 and noticed that we can actually unit test both code branches by stubbing |
Fixes #312