delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/03/29/00:42:36

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:content-type
:content-transfer-encoding:mime-version; q=dns; s=default; b=c3+
ZQmScEccqkn5Nxge0Oq6yXnDT5f2navXuGZOTXo9FUqYECCl/TpKBfFzDg752yOl
xYjyD5wssUvQg9tLZKccfe18TVzNq3sFRb9+HChobcHMxrmbfiEx0f2zOTy4g4I4
EF9/R8EJEdCnJVYKWc1Vpa/N47skG9QjARqaYu/A=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:content-type
:content-transfer-encoding:mime-version; s=default; bh=4zOzhOdyS
QhIj5XfoZHKDtJS6zM=; b=J83V8aaGRk9kY7hvMqlNXwWkz6shzVwa91UAR07TG
mePMPCClgJYEV5P/5SpyrjAIdQnwhTDf8qRiqJg1h64nWbky5IeqBRTTgrGvgWdB
BpUnRrv9w9FN5NCDZl9iU32GR0BDEXN4QLmu88wCjYxZPwLoYU/TzU2MU+Xs1k+i
6U=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: nihxway6out.hub.nih.gov
X-IronPortListener: Outbound_SMTP
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AhcFACdONlOcKEem/2dsb2JhbABZgwaBEsJ5gRUWdIInAQQSFRNRARUVFAUqExcBDgEEGxqHV59XhHqtDheCXItxg1yBFASOeJBLg2eHWYFxgT+CKw
From: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" <lavr AT ncbi DOT nlm DOT nih DOT gov>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: cgwin_internal(): difference b/w CW_CYGWIN_PID_TO_WINPID and CW_GETPINFO_FULL for taking only dwProcessId ?
Date: Sat, 29 Mar 2014 04:42:11 +0000
Message-ID: <5F8AAC04F9616747BC4CC0E803D5907D0C8A8F52@MLBXv04.nih.gov>
MIME-Version: 1.0
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id s2T4gUNV007483

Hi,

I need to kill a process in a way that CYGWIN's own kill utility does
with an option -f, and for that, given CYGWIN's PID, I need to figure
out native Windows PID of the victim.

kill does basically the following (I simplified):

p = (external_pinfo *) cygwin_internal (CW_GETPINFO_FULL, pid);
DWORD dwpid = p->dwProcessId;

while there's a CW_CYGWIN_PID_TO_WINPID enum for cygwin_internal,
which supposedly returns a Windows PID right away.

Is there any difference between the two in finding out the PID?

Thanks,

Anton Lavrentiev
Contractor NIH/NLM/NCBI



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


- Raw text -


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