mirror of https://github.com/winsw/winsw
* Issue #237 - Improve diagnostics of the Runaway Process Killer when it kills the process * Issue #237 - Also print the process (not sure if it's safe)pull/252/head
parent
221d30f271
commit
8d94277288
|
@ -6,6 +6,7 @@ using winsw.Extensions;
|
|||
using winsw.Util;
|
||||
using log4net;
|
||||
using System.Collections.Specialized;
|
||||
using System.Text;
|
||||
|
||||
namespace winsw.Plugins.RunawayProcessKiller
|
||||
{
|
||||
|
@ -151,7 +152,18 @@ namespace winsw.Plugins.RunawayProcessKiller
|
|||
}
|
||||
|
||||
// Kill the runaway process
|
||||
Logger.Warn("Stopping the runaway process (pid=" + pid + ") and its children.");
|
||||
StringBuilder bldr = new StringBuilder("Stopping the runaway process (pid=");
|
||||
bldr.Append(pid);
|
||||
bldr.Append(") and its children. Environment was ");
|
||||
if (!CheckWinSWEnvironmentVariable) {
|
||||
bldr.Append("not ");
|
||||
}
|
||||
bldr.Append("checked, affiliated service ID: ");
|
||||
bldr.Append(affiliatedServiceId != null ? affiliatedServiceId : "undefined");
|
||||
bldr.Append(", process to kill: ");
|
||||
bldr.Append(proc);
|
||||
|
||||
Logger.Warn(bldr.ToString());
|
||||
ProcessHelper.StopProcessAndChildren(pid, this.StopTimeout, this.StopParentProcessFirst);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue