SIGKILL and TerminateProcess

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Tue Oct 29 19:40:00 GMT 2013


On Tue, Oct 29, 2013 at 06:37:46PM +0000, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
>> Sorry but we aren't going to redesign the signal delivery mechanism for
>> your use case.
>>It wasn't exactly a redesign I was asking about; rather an addition
>(or an improvement, if you will) for only the case of that one KILL
>signal, which is already a special thing in all aspects even on UNIX.

As the person who wrote the signal handling code, I think I get to
specify what I consider to be a redesign.
>>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.
>>Windows Sleep() was just a convenient dummy to demonstrate how SIGKILL
>does not kill.

You may notice that I didn't specify Sleep() in my explanation.
>CYGWIN lets me access some Windows-specific APIs (the same way one
>would do by using some UNIX-flavor-specific libraries), without having
>to port them all to CYGWIN first. Such code becomes a real problem in
>pipelining because it cannot be reliably managed from other processes
>(which would all require modifications to do TerminateProcess tricks
>throughout; or use the special CYGWIN command-like utility) where just
>kill(9) would have been sufficient..

To be a broken record: The whole point of Cygwin is to run UNIX based
programs on Windows. Asking for the addition of special-case code so
that people can use Windows functions in their programs completely
misses the point of this project.
That said, however, the Cygwin "kill" command does have a "-f" option
which forces the termination of a process if it can't be killed with
Cygwin's signal mechanism (I added it so that I could kill processes
that were hung while I was working on Cygwin's signal code). If it is
essential that you be able to summarily terminate Windows programs then
use that.
Otherwise, I guarantee that continuing to insist that you need this will
avail you naught. Your suggested change is not going to be implemented.
cgf
--
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


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /