mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-16 01:25:41 -05:00
Add functionality to shutdown Kusto process when parent process exits (#1609)
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Utility
|
||||
{
|
||||
internal const string ServiceLayerServiceName = "MicrosoftSqlToolsServiceLayer.exe";
|
||||
|
||||
private static readonly string[] serviceLayerCommandArgs = { "-d", "--developers", "--parent-pid" };
|
||||
private static readonly string[] serviceLayerCommandArgs = { "-d", "--developers" };
|
||||
|
||||
/**
|
||||
* List of contributors to this project, used as part of the onboarding process.
|
||||
@@ -24,8 +24,6 @@ namespace Microsoft.SqlTools.ServiceLayer.Utility
|
||||
"Charles-Gagnon"
|
||||
};
|
||||
|
||||
public int? ParentProcessId { get; private set; }
|
||||
|
||||
public ServiceLayerCommandOptions(string[] args) : base(args.Where(arg => !serviceLayerCommandArgs.Contains(arg)).ToArray(), ServiceLayerServiceName)
|
||||
{
|
||||
for (int i = 0; i < args.Length; ++i)
|
||||
@@ -44,13 +42,6 @@ namespace Microsoft.SqlTools.ServiceLayer.Utility
|
||||
Console.WriteLine(string.Join(Environment.NewLine, contributors.Select(contributor => $"\t{contributor}")));
|
||||
this.ShouldExit = true;
|
||||
break;
|
||||
case "--parent-pid":
|
||||
string nextArg = args[++i];
|
||||
if (Int32.TryParse(nextArg, out int parsedInt))
|
||||
{
|
||||
ParentProcessId = parsedInt;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user