> From: Earnie Boyd > Sent: Friday, September 21, 2012 11:29 AM > To: cygwinAtcygwinDOTcom > Subject: Re: Cygwin corrupted taskkill in windows commandline > > On Fri, Sep 21, 2012 at 11:59 AM, Voris, Ben wrote: > > On my system, taskkill is /cygdrive/c/Windows/system32/taskkill. That is, > > it is not part of Cygwin but is part of Windows. I suspect either that your > > PATH no longer includes /cygdrive/c/Windows/system32 or that taskkill.exe > > has been removed from that Windows directory. > > If it is 64 bit system then it will not be available in a 32 bit > process such as Cygwin's bash in that directory. You'll need to look > at /cygdrive/c/Windows/sysnative/taskkill instead. > > -- > Earnie > -- https://sites.google.com/site/earnieboyd >
As I read it, http://msdn.microsoft.com/en-us/library/windows/desktop/aa384187(v=vs.85).aspx says that use of sysnative is optional for WOW64 applications. However, http://support.microsoft.com/kb/942589 reports a problem with directly using system32 on 64-bit version of Server 2003 and Windows XP. Perhaps the version of Microsoft Windows is the issue? On my Windows-7 64-bit system, sysnative is not in the path but system32 is. On that system, taskkill seems to work from Cygwin. : file $(type -p taskkill.exe) /cygdrive/c/Windows/system32/taskkill.exe: PE32 executable (console) Intel 80386, for MS Windows : $taskkill /? TASKKILL [/S system [/U username [/P [password]]]] { [/FI filter] [/PID processid | /IM imagename] } [/T] [/F] Description: This tool is used to terminate tasks by process id (PID) or image name. ... C:\> dir %SYSTEMROOT%\taskkill.exe /s ... Directory of C:\Windows\System32 2009-07-13 18:39 112,640 taskkill.exe 1 File(s) 112,640 bytes Directory of C:\Windows\SysWOW64 2009-07-13 18:14 77,824 taskkill.exe 1 File(s) 77,824 bytes