On Mar 11, 5:28 pm, Junkone <junko... / gmail.com> wrote:
> I was reviewing the docs for Module Process  in WIN32_PROCESS and
> found the following docs for Kill. What does signal 4-8 do and how
> does it make it nicer kill. why is it 4-8 and what is the degree of
> niceness as it goes along.

Actually, it's 1 and 4-8. Signals 2 and 3 were chosen for SIGINT and
SIGBRK, respectively, because that's what their Unix counterparts are
(typically). In practice these will rarely be used.

They're nicer because they use a different technique for killing a
process than the 9 signal does. The 9 signal uses TerminateProcess()
behind the scenes, which is a brute force way to kill a process that
bypasses any exit handlers the process may have setup. Signals 1 and
4-8 use a CreateRemoteThread() + ExitProcess() technique, which *does*
allow the process to run any exit handlers first.

Regards,

Dan