From: Vadim Zeitlin Date: Tue, 23 Jul 2013 12:44:36 +0000 (+0000) Subject: Document wxKill(wxSIGTERM) reliance on having an open window in wxMSW. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9c34a216817028bc533e07873d047208a96b05a2?ds=inline Document wxKill(wxSIGTERM) reliance on having an open window in wxMSW. wxKill(wxSIGTERM) doesn't work if the child process has no open windows as it doesn't have anything to post the WM_QUIT message to. Document this and point out that wxKill(wxSIGKILL) still works in this case. Closes #15356. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/interface/wx/utils.h b/interface/wx/utils.h index 4a8a54ef65..03eef43e6e 100644 --- a/interface/wx/utils.h +++ b/interface/wx/utils.h @@ -1278,7 +1278,12 @@ unsigned long wxGetProcessId(); @c wxSIGNONE, @c wxSIGKILL and @c wxSIGTERM have the same meaning under both Unix and Windows but all the other signals are equivalent to - @c wxSIGTERM under Windows. + @c wxSIGTERM under Windows. Moreover, under Windows, @c wxSIGTERM is + implemented by posting a message to the application window, so it only + works if the application does have windows. If it doesn't, as is notably + always the case for the console applications, you need to use @c wxSIGKILL + to actually kill the process. Of course, this doesn't allow the process to + shut down gracefully and so should be avoided if possible. Returns 0 on success, -1 on failure. If the @a rc parameter is not @NULL, it will be filled with a value from the @c wxKillError enum: