cgwin_internal(): difference b/w CW_CYGWIN_PID_TO_WINPID and CW_GETPINFO_FULL for taking only dwProcessId ?
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Mar 31 10:27:00 GMT 2014
On Mar 29 04:42, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
> 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?
If you're only after the windows pid, CW_CYGWIN_PID_TO_WINPID is
sufficient.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20140331/18c0d858/attachment.sig>
More information about the Cygwin
mailing list