[Python-Dev] RE: how to kill process on Windows started with os.spawn?

Martin v. Löwis martin@v.loewis.de
02 Dec 2002 10:25:22 +0100


Tim Peters <tim.one@comcast.net> writes:

> Yes.  On Windows it wants a handle, because that's what spawn*()
> returns on Windows.  But, again, Windows processes aren't intended
> to be killed externally.

That sounds like FUD. Why is it that processes aren't intended to be
killed? Because the assassin can't know what state the process is in,
so the process may not complete correctly?

This is a general problem with killing, not specific to Windows, and
it never stopped a killer.

Or can you crash the operating system or the killer process by
terminating some other process?

> Why do you need to kill a process externally?  For example, why can't you
> make "please stop now" a part of the protocol, so that a process can
> terminate itself gracefully when told to?

Because the process did not respond to the protocol. Should I kill it
anyway and send a bug report to Microsoft?

Regards,
Martin