This is the mail archive of the
cygwin
mailing list for the Cygwin project.
cgwin_internal(): difference b/w CW_CYGWIN_PID_TO_WINPID and CW_GETPINFO_FULL for taking only dwProcessId ?
- 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>
- Date: Sat, 29 Mar 2014 04:42:11 +0000
- Subject: cgwin_internal(): difference b/w CW_CYGWIN_PID_TO_WINPID and CW_GETPINFO_FULL for taking only dwProcessId ?
- Authentication-results: sourceware.org; auth=none
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