This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: kill_python doesn't work with short path
Type: behavior Stage: resolved
Components: Windows Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, ocean-city, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2010-10-18 11:29 by ocean-city, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
py3k_fix_kill_python_for_short_path.patch ocean-city, 2010-10-18 11:29 review
Messages (6)
msg119007 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-10-18 11:29
When kill_python[,d].exe was called via short path,
no python processes won't be killed. This happens
because, directory path is compared via simple
wcsnicmp. If one is short path and another is long path,
wcsnicmp determines they are not same path. This patch
solves this issue with GetFileInformationByHandle's
File ID information.

Probably this won't happen so much, so priority is low.
msg220857 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-17 18:42
Can somebody review the attached patch please.
msg220872 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-06-17 20:08
I'm inclined to close as 'won't fix'; kill_python.exe is an "eh, good enough" hack meant mostly for the buildbots anyway, and short paths are exceptionally rare these days.  If anything, I'd just add a warning that if "~" is in the path, all bets are off.
msg220874 - (view) Author: Tim Golden (tim.golden) * (Python committer) Date: 2014-06-17 20:12
+1
msg220876 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2014-06-17 20:14
My usual way of doing this is to use taskkill.exe, but that only uses process name and not the full path, which may hurt people who are building with other versions of Python open.

I'd rather use GetFullPathName than the current patch, but if wontfix is the preferred option, I'm fine with that too.
msg220884 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-06-17 20:45
If anybody actually has a problem with this in future, they can reopen the issue and try using GetFullPathName as Steve suggested.
History
Date User Action Args
2022-04-11 14:57:07adminsetgithub: 54345
2014-06-17 20:45:33zach.waresetstatus: open -> closed
resolution: wont fix
messages: + msg220884

stage: resolved
2014-06-17 20:14:13steve.dowersetmessages: + msg220876
2014-06-17 20:12:32tim.goldensetmessages: + msg220874
2014-06-17 20:08:19zach.waresetmessages: + msg220872
2014-06-17 19:43:51ned.deilysetnosy: + tim.golden, zach.ware, steve.dower
components: + Windows, - Build
2014-06-17 18:42:42BreamoreBoysetnosy: + BreamoreBoy

messages: + msg220857
versions: + Python 3.4, Python 3.5, - Python 3.1, Python 3.2
2010-10-18 11:29:54ocean-citycreate