| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-Spam-Check-By: | sourceware.org |
| Message-ID: | <6910a60806261537v181651e5v98535c0683682161@mail.gmail.com> |
| Date: | Fri, 27 Jun 2008 00:37:14 +0200 |
| From: | "Reini Urban" <rurban AT x-ray DOT at> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Get the cygwin PID of a Win PID |
| In-Reply-To: | <d37422b50806260631kd709a1cm64e67bec827ac32f@mail.gmail.com> |
| MIME-Version: | 1.0 |
| References: | <d37422b50806260631kd709a1cm64e67bec827ac32f AT mail DOT gmail DOT com> |
| X-Google-Sender-Auth: | 06fadd101ed6ccc8 |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
2008/6/26 Borislav Ivanov:
> I'm currently updating cygwin from 1.3.22 to 1.5.25 and I encountered
> a problem with Winpids/Cygwinpids. I have a custom tool that checks if
> a process is running by invoking kill(PID, 0).
> I searched through the list, but found only transition from cygwinpid
> to winpid (by using winpid = cygwin_internal(CW_CYGWIN_PID_TO_WINPID,
> pid)). Is there some analogue to retrieve the corresponding cygwinpid
> of a winpid?
You didn't look hard enough.
cygwin_internal(CW_CYGWIN_PID_TO_WINPID, pid)
<=>
#if (CYGWIN_VERSION_API_MINOR >= 181)
RETVAL = cygwin_winpid_to_pid(pid);
#else
RETVAL = cygwin32_winpid_to_pid(pid);
#endif
--
Reini Urban
http://phpwiki.org/ http://murbreak.at/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |