X-Recipient: archive-cygwin@delorie.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:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=WQ9Hcu6meL7mJlI2DXhYyo5gFToUDQsv5PR3O4W1zdFDmScHV/8hB
	7AY6bRWXpM9ROD72g4LSLHPH8bbpMJfm9E+3ImG/zk4HR4vLTOsyNyetG+J/cWhi
	lrFluWAfvHcwn1feeluGTdiwwQjBAvm/ByGnXchZo8eHYYC6flJGS4=
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:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=WDb1/N5AvUt+htibUlEiROY/ufM=; b=Po7ytX/SMZZV72ZFu+s5j9Hh6dmz
	phDXlFP6yYV0GS4174ywzR78aMtVXAwnOgiBrn3i2qtKZXuK57kepiqGYp0/AWbw
	B8AOiw7vUu4QutaEi/HO70xhR8RBI+z/FPtiGCZL3mGx1nqtxw5uehAqL3esiAA1
	OBuk68RJADcy2+U=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Mon, 31 Mar 2014 10:31:12 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: cgwin_internal(): difference b/w CW_CYGWIN_PID_TO_WINPID and CW_GETPINFO_FULL for taking only dwProcessId ?
Message-ID: <20140331083112.GB23383@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <5F8AAC04F9616747BC4CC0E803D5907D0C8A8F52@MLBXv04.nih.gov>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;	protocol="application/pgp-signature"; boundary="b5gNqxB1S1yM7hjW"
Content-Disposition: inline
In-Reply-To: <5F8AAC04F9616747BC4CC0E803D5907D0C8A8F52@MLBXv04.nih.gov>
User-Agent: Mutt/1.5.21 (2010-09-15)

--b5gNqxB1S1yM7hjW
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mar 29 04:42, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
> Hi,
>=20
> 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.
>=20
> kill does basically the following (I simplified):
>=20
> p =3D (external_pinfo *) cygwin_internal (CW_GETPINFO_FULL, pid);
> DWORD dwpid =3D p->dwProcessId;
>=20
> while there's a CW_CYGWIN_PID_TO_WINPID enum for cygwin_internal,
> which supposedly returns a Windows PID right away.
>=20
> Is there any difference between the two in finding out the PID?

If you're only after the windows pid, CW_CYGWIN_PID_TO_WINPID is
sufficient.


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--b5gNqxB1S1yM7hjW
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJTOSfQAAoJEPU2Bp2uRE+gfr8P/ia+1eE5l6RCUG/Hxx6/ZTx3
xDo9iQ/11kbBWOutxsGKyEbHGUrdP9L1fNA4TvcoXaggCzO43b3Bsqh2hs1ftl3q
jVHaLByIIzluTh4Obtq7h6dVH8uX6SPSrHU9a9dViQ3leHVkkgoO/JWlvJNqE4cr
+eSO00rvSOMIjGHMeulE2VTY8InZj5sMaSUFWuSAL8XscNzGSROQh4IVoM75lmKT
H+kDzPtofsx55kUCsza8DTZCg1YBe0YMsnMoYmE3ztBSJbDwZuAvHeLCaW5Mkw/L
iCPVxxRlKlNKokJ6+jGe7tEqOd7f91EHdaY6zB5D2psAlSgxf6mWyWEphmwiN3Ks
U/lzWZ8ZO8CvU1FEJK3fHQET+Ip3rMwi95vxYQZSPMmTy2kiaCdNXZqPE0vc+CA5
7u4HjIwNfJ7uchkSA17xIjL5Gzofa65aOaSEDKGmNNzg7cQUTHykC+wyuMFNKFTp
dSngRcI/J2IgWq6RbBYM4/aNle0q4DNFUexz/W7n1RgiJCGTLBLcKpbAYhfXhvWb
7eehhLH5UVhGwDmcm7UDjCsZPA1JakcS/qzTvQVl8P8whwv8G2+tWyC8VLBq0gyv
LhsEuJSAtgJtHJhzdpTkgyqITKBj+qaihOha8daMHKTXTbbx/ITAIolkO2Bjm6+S
eaSgOs53hJ32Z8AHNGuO
=mf7N
-----END PGP SIGNATURE-----

--b5gNqxB1S1yM7hjW--
