Comment #0 by yarrluben+dbugs — 2013-05-30T16:35:06Z
The description for std.process.kill includes a windows-specific warning about process termination.
The warning includes a link to http://blogs.msdn.com/b/oldnewthing/archive/2007/05/03/2383346.aspx , where the function ExitProcess is explained to kill all but the calling thread before issuing detach-messages to the loaded dll's. Because the other threads have been murdered, the state of the process can cause the last thread to hang. The warning states that 'The mechanisms for process termination are [incredibly badly specified] in the Windows API', but any google search for ExitProcess brings you to a pretty detailed explanation of the process ( http://msdn.microsoft.com/en-us/library/windows/desktop/ms682658%28v=vs.85%29.aspx ), which even warns about the case in the blog post.
Anyway, std.process.kill is implemented with TerminateProcess which forcibly kills _all_ the threads in a target process and no detach-messages are issued to the loaded dll's. (This is mentioned in http://msdn.microsoft.com/en-us/library/windows/desktop/ms686722%28v=vs.85%29.aspx )
Thus the warning is about something irrelevant(ExitProcess) and ought not be there.
Comment #1 by bugzilla — 2013-07-28T08:25:09Z
The "badly specified" part refers to the fact that process termination is done differently in different versions of Windows, and these differences are not specified in Microsoft's documentation.
But you're right, we probably don't need that warning. Consider it gone.
Comment #2 by github-bugzilla — 2013-07-28T14:46:02Z