delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/09/24/12:23:28

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.2 required=5.0 tests=AWL,BAYES_05,GENERIC_IXHASH,KHOP_THREADED,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
From: "Voris, Ben" <ben DOT voris AT hp DOT com>
To: "Voris, Ben" <ben DOT voris AT hp DOT com>, "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: RE: Cygwin corrupted taskkill in windows commandline
Date: Mon, 24 Sep 2012 16:18:10 +0000
Message-ID: <9CCB06BEBBF0F74FB4964A481BC332D954C63679@G1W3783.americas.hpqcorp.net>
References: <CA+sc5mnq_1BHQ_r2Rv598O8-+bvORKtMnDF0HARtTVw1F-90BA AT mail DOT gmail DOT com>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id q8OGNPPN027581

> 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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019