diff --git a/doc/extensions/runawayProcessKiller.md b/doc/extensions/runawayProcessKiller.md index 5b6d045..e2e6e57 100644 --- a/doc/extensions/runawayProcessKiller.md +++ b/doc/extensions/runawayProcessKiller.md @@ -35,8 +35,6 @@ The extension can be configured via the [XML configuration file](../xmlConfigFil After the timeout WinSW will try to force kill the process. --> 5000 - - false diff --git a/doc/xmlConfigFile.md b/doc/xmlConfigFile.md index 6799c0c..ab09423 100644 --- a/doc/xmlConfigFile.md +++ b/doc/xmlConfigFile.md @@ -352,13 +352,3 @@ Possible values are `idle`, `belownormal`, `normal`, `abovenormal`, `high`, `rea Specifying a priority higher than normal has unintended consequences. For more information, see [ProcessPriorityClass Enumeration](https://docs.microsoft.com/dotnet/api/system.diagnostics.processpriorityclass) in .NET docs. This feature is intended primarily to launch a process in a lower priority so as not to interfere with the computer's interactive usage. - -### Stop parent process first - -Optionally specify the order of service shutdown. -If `true`, the parent process is shutdown first. -This is useful when the main process is a console, which can respond to Ctrl+C command and will gracefully shutdown child processes. - -```xml -true -``` diff --git a/examples/sample-allOptions.xml b/examples/sample-allOptions.xml index f02ae6a..7ffb4ff 100644 --- a/examples/sample-allOptions.xml +++ b/examples/sample-allOptions.xml @@ -132,13 +132,6 @@ SECTION: Executable management Default value: 15 seconds --> 15 sec - - - false 5000 - - false diff --git a/src/Test/winswTests/Extensions/RunawayProcessKillerTest.cs b/src/Test/winswTests/Extensions/RunawayProcessKillerTest.cs index 4db32ff..92dcb54 100644 --- a/src/Test/winswTests/Extensions/RunawayProcessKillerTest.cs +++ b/src/Test/winswTests/Extensions/RunawayProcessKillerTest.cs @@ -33,7 +33,6 @@ $@" foo/bar/pid.txt 5000 - true "; @@ -52,7 +51,6 @@ $@" Assert.IsNotNull(extension, "RunawayProcessKillerExtension should be loaded"); Assert.AreEqual("foo/bar/pid.txt", extension.Pidfile, "Loaded PID file path is not equal to the expected one"); Assert.AreEqual(5000, extension.StopTimeout.TotalMilliseconds, "Loaded Stop Timeout is not equal to the expected one"); - Assert.AreEqual(true, extension.StopParentProcessFirst, "Loaded StopParentFirst is not equal to the expected one"); } [Test] @@ -110,7 +108,7 @@ $@" if (!proc.HasExited) { Console.Error.WriteLine("Test: Killing runaway process with ID=" + proc.Id); - ProcessHelper.StopProcessAndChildren(proc, TimeSpan.FromMilliseconds(100), false); + ProcessHelper.StopProcessTree(proc, TimeSpan.FromMilliseconds(100)); if (!proc.HasExited) { // The test is failed here anyway, but we add additional diagnostics info diff --git a/src/Test/winswTests/ServiceDescriptorTests.cs b/src/Test/winswTests/ServiceDescriptorTests.cs index f39ec9a..906adaa 100644 --- a/src/Test/winswTests/ServiceDescriptorTests.cs +++ b/src/Test/winswTests/ServiceDescriptorTests.cs @@ -136,23 +136,6 @@ $@" Assert.That(sd.Priority, Is.EqualTo(ProcessPriorityClass.Normal)); } - [Test] - public void StopParentProcessFirstIsFalseByDefault() - { - Assert.That(_extendedServiceDescriptor.StopParentProcessFirst, Is.False); - } - - [Test] - public void CanParseStopParentProcessFirst() - { - const string seedXml = "" - + "true" - + ""; - var serviceDescriptor = ServiceDescriptor.FromXML(seedXml); - - Assert.That(serviceDescriptor.StopParentProcessFirst, Is.True); - } - [Test] public void CanParseStopTimeout() { diff --git a/src/Test/winswTests/Util/ConfigXmlBuilder.cs b/src/Test/winswTests/Util/ConfigXmlBuilder.cs index dd926a0..340cd27 100644 --- a/src/Test/winswTests/Util/ConfigXmlBuilder.cs +++ b/src/Test/winswTests/Util/ConfigXmlBuilder.cs @@ -116,7 +116,6 @@ namespace winswTests.Util str.AppendFormat(" \n", new object[] { enabled, fullyQualifiedExtensionName, extensionId }); str.AppendFormat(" {0}\n", ext.Pidfile); str.AppendFormat(" {0}\n", ext.StopTimeout.TotalMilliseconds); - str.AppendFormat(" {0}\n", ext.StopParentProcessFirst); str.AppendFormat(" {0}\n", ext.CheckWinSWEnvironmentVariable); str.Append(" \n"); ExtensionXmls.Add(str.ToString());