Bracing against the wind  

Saturday, September 04, 2004

kill.exe hanging/crashing

For whatever reason, the version of kill.exe shipping with Windows NT/2000 would hang/crash on one of my servers. I think it was the code that got the "module name" for a match that was breaking (not sure, since it's not open source).

I hastily rewrote "kill.exe". At first, I thought I was crazy to think that "kill" was the culprit. But, indeed, my version kills things nicely or prints an error, and the version shipping with the reskit (or wherever I got it) doesn't.

When given a nonnumeric argument, it searches process executable names and it only gets a match if it matches up to the "." or up to the end of the name. IE: you can "kill calc" or "kill calc.exe" but you can't "kill calculator" or "kill cal" and expect it to match. It kills pids if the first argument consists, entirely, of digits.

Here's the source. And here's the binary.


[View/Post Comments] [Digg] [] [Stumble]

Home | Email me when this weblog updates: | View Archive

(C) 2002 Erik Aronesty/DocumentRoot.Com. Right to copy, without attribution, is given freely to anyone for any reason.

Listed on BlogShares | Bloghop: the best pretty good | Blogarama | Technorati | Blogwise