This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: SIGKILL and TerminateProcess
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 29 Oct 2013 13:22:05 -0400
- Subject: Re: SIGKILL and TerminateProcess
- Authentication-results: sourceware.org; auth=none
- References: <5F8AAC04F9616747BC4CC0E803D5907D0C40AFEB at MLBXv04 dot nih dot gov>
- Reply-to: cygwin at cygwin dot com
On Tue, Oct 29, 2013 at 03:47:47PM +0000, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
>Hello List,
>
>I have a question, as to why CYGWIN does not use the TerminateProcess approach when
>dealing with SIGKILL sent to a process (in the manner the CYGWIN's own kill utility
>does when invoked with -f)? Usually SIGKILL is expected to reliably terminate
>its victim (let alone it can't be intercepted, hence, does not need any "handling"
>provisions). Yet under CYGWIN, if the point of execution is found as "unsafe" in the
>target process, the signal cannot be delivered quickly. Such as when the process is busy dealing with a time-consuming Windows API (the dumbest example is Sleep() ;-),
>then the process will not get killed even with SIGKILL. Could CYGWIN please consider
>special-casing SIGKILL to perform something similar to the force-killing of the
>command-line utility?
Sorry but we aren't going to redesign the signal delivery mechanism for
your use case.
Cygwin does not guarantee delivery of signals to processes which are
calling Windows API functions directly. If you do that you should be
prepared to deal with problems.
If you are finding that SIGKILL does not reliably kill a blocking UNIX
function, however, that is a bug.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple