This is the mail archive of the
mailing list for the Cygwin project.
Re: Why is too fast PID reuse a problem?
On Fri, Oct 03, 2003 at 03:17:46PM +0100, Max Bowsher wrote:
>Lapo Luchini wrote:
>> Vaclav Haisman wrote:
>>> I have been searching for why Cygwin doesn't use native Windows PIDs
>> Does it?
>> I see the same PIDs in TaskManager and in "ps"...
>Look carefully at "ps", specifically the PID and WINPID columns. Often they
>are the same, but not always.
When you start a process from a command prompt, the initial pid == winpid.
When the process forks, the forked pid == the winpid. When a process
execs another process, the cygwin pid stays the same (as it should) but
the windows pid changes. The windows pid has to change because the
Windows API offers no equivalent to the UNIX exec call. Every process
created by CreateProcess gets its own pid so cygwin needs to have its
own concept of a pid even though the pid that cygwin uses is always
based on a windows pid.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html