Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Enhancement: Cleaning up child node process after ending debug #8

Closed

Conversation

GregYankovoy
Copy link

  • Dangling node process continues to run webpack-dev-server indefinitely
  • Using existing AspNetCore libraries to end child process when debug is ended

Sourced from IIS Express Testing:
https://github.com/aspnet/AspNetCore/blob/3477daf3c4f530dff80f197e0642cb39a26fb07b/src/Servers/IIS/IntegrationTesting.IIS/src/ProcessTracker.cs

@EEParker
Copy link
Owner

Is this limited to windows only?

@GregYankovoy
Copy link
Author

GregYankovoy commented Feb 23, 2019

Yes, this cleanup activity is limited to Windows only (specifically Windows 8 & above). I have just confirmed the issue exists on linux as well (Ubuntu 18.04). I am not familiar with an aspnetcore solution for Linux.

I would obviously prefer to implement a universal solution, but I believe the problem is severe enough to warrant something OS-specific temporarily.

@agentschmitt
Copy link

Any chance that this will be integrated soon?
Working in Visual Studio it is anoying that the node process keeps running after stop debugging.
Would love to have this feature 👍

@EEParker
Copy link
Owner

I'm also assume this exists with the aspnet core npm runner: https://github.com/aspnet/AspNetCore/blob/master/src/Middleware/SpaServices.Extensions/src/Npm/NpmScriptRunner.cs

@EEParker
Copy link
Owner

FYI, I agree with the premise of this update. However, the more this library deviates from the SpaService.Extensions, the harder it will be to maintain. As of right now I can easily merge any upstream changes manually. If this is the only solution suggested within a few weeks, then I will merge it.

@EEParker EEParker added enhancement New feature or request help wanted/accepting PR Accepting pull requests. labels Mar 25, 2019
@EEParker
Copy link
Owner

TODO: investigate dotnet/corefx#34147

@EEParker
Copy link
Owner

Here is another topic that also kills POSIX child processes
dotnet/cli#10720

@EEParker
Copy link
Owner

EEParker commented Jun 17, 2019

I went a little different route, it is not as robust of a solution as the proposed implementation in this PR, but it should be cross platform.
https://github.com/EEParker/aspnetcore-vueclimiddleware/blob/master/src/VueCliMiddleware/Util/KillPort.cs

c3defb6

@EEParker EEParker closed this Jun 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted/accepting PR Accepting pull requests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants