delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/03/14:42:41

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Fri, 3 Oct 2003 14:42:25 -0400
From: Christopher Faylor <cgf-rcm AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Why is too fast PID reuse a problem?
Message-ID: <20031003184225.GB27393@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20031003113051 DOT D21587 AT logout DOT sh DOT cvut DOT cz> <3F7D755D DOT 1050202 AT lapo DOT it> <008c01c389b9$1f7740d0$cf547ad5 AT starfruit>
Mime-Version: 1.0
In-Reply-To: <008c01c389b9$1f7740d0$cf547ad5@starfruit>
User-Agent: Mutt/1.4.1i

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.

cgf

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019