# Runaway Process Killer Extension In particular cases Windows service wrapper may leak the process after the service completion. It happens when WinSW gets terminated without executing the shutdown logic. Examples: force kill of the service process, .NET Runtime crash, missing permissions to kill processes or a bug in the logic. Such runaway processes may conflict with the service process once it restarts. This extension allows preventing it by running the runaway process termination on startup before the executable gets started. Since: [WinSW 2.0](../../CHANGELOG.md). ### Usage The extension can be configured via the [XML Configuration File](../xmlConfigFile.md). Configuration sample: ```xml sampleService Sample service This is a stub service. %BASE%\sleep.bat rotate %BASE%\pid.txt 5000 false ``` ### Notes * The current implementation of the the extension checks only the root process (started executable) * If the runaway process is detected the entire, the entire process tree gets terminated * WinSW gives the runaway process a chance to the gracefully terminate. If it does not do it within the timeout, the process will be force-killed. * If the force kill fails, the WinSW startup continues with a warning.