From de19678bc5e08467d88ea505911df8ba23b6da8a Mon Sep 17 00:00:00 2001 From: Next Turn <45985406+NextTurn@users.noreply.github.com> Date: Thu, 6 Aug 2020 16:01:44 +0800 Subject: [PATCH] Send a close message to Windows (GUI) apps --- docs/xml-config-file.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/xml-config-file.md b/docs/xml-config-file.md index 6017563..0bfeedb 100644 --- a/docs/xml-config-file.md +++ b/docs/xml-config-file.md @@ -170,10 +170,10 @@ The system default preshutdown timeout is there minutes. ### stoptimeout -When the service is requested to stop, winsw first attempts to send a Ctrl+C signal, +When the service is requested to stop, winsw first attempts to send a Ctrl+C signal to a console application, or post a close message to a Windows application, then wait for up to 15 seconds for the process to exit by itself gracefully. -A process failing to do that (or if the process does not have a console), - then winsw resorts to calling [TerminateProcess function](https://docs.microsoft.com/windows/win32/api/processthreadsapi/nf-processthreadsapi-terminateprocess) to kill the service instantly. +If the timeout expires or the signal or message can't be sent, + then winsw resorts to terminate the service instantly. This optional element allows you to change this "15 seconds" value, so that you can control how long winsw gives the service to shut itself down. See `` below for how to specify time duration: