This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Get the cygwin PID of a Win PID


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]