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

Commit

Permalink
Merge pull request #43 from lafriks-fork/fix/kill_linux
Browse files Browse the repository at this point in the history
Fix killing previous process on Linux and OSX
  • Loading branch information
EEParker authored Jan 30, 2020
2 parents 01be9bf + 488a487 commit 93b6577
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/VueCliMiddleware/Util/KillPort.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,14 @@ public static bool Kill(int pid, bool force = false, bool tree = true)
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
if (force) { args.Add("-9"); }
RunProcessReturnOutput("kill", "");
args.Add(pid.ToString());
RunProcessReturnOutput("kill", string.Join(" ", args));
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
if (force) { args.Add("-9"); }
RunProcessReturnOutput("kill", "");
args.Add(pid.ToString());
RunProcessReturnOutput("kill", string.Join(" ", args));
}
else
{
Expand Down

0 comments on commit 93b6577

Please sign in to comment.