ok that explains it
but how does ProcessExplorer kill them ?
with this tool i'm able to kill the process without problems,
maybe we can use the same method ... ?
We
can kill it, no problem. But we
don't want to.
What we do is we send the process
SIGTERM. Under Linux, every decent program understands this as a kick in the rear with the demand to get lost as soon as possible, albeit in a gentle manner.
Under Windows, nothing happens if you send
SIGTERM. It is simply not implemented.
What ProcessExplorer does (in Posix terms) is
SIGKILL, which we do not want to use because it just kills the process in an uncontrolled manner. Even though it probably works, sigkilling a program is not nice. You don't really know what happens, files may stay locked or be left in an inconsistent state, memory may not be freed, anything...
EDIT:For completeness, it should be mentioned that wxWidgets implements a workaround for Windows by sending a
WM_CLOSE notification. This implements a
SIGTERM-like graceful shutdown behaviour for GUI apps. However, this only works if the application has a window, and gcc obviously doesn't.