Mail Archives: cygwin/2005/03/31/20:17:02
----- Original Message -----
From: "Corinna Vinschen" <corinna AT vinschen DOT de>
To: <cygwin AT cygwin DOT com>
Sent: Thursday, March 31, 2005 10:06 PM
Subject: Re: 1.5.13:Is it difficult to make cygwin recycle pids when create new process?
> On Mar 31 21:36, Merlin Ran wrote:
> > see:
> > http://sourceware.org/ml/cygwin/2005-03/msg00657.html
> >
> > When start a new Windows process, the system attempt to recycle a previously
> > used PID, so the maximam PID in the system is low. But when I invoke a
> > command in Cygwin, the PID of new process always increase. It may not be a
> > problem as long as the maximam PID doesn't exceed the limit, but
> > unfortunately it will. As I discovered, my Win2000 Professional system's PID
> > limit is a little more than 17000, many configure script I have run, such as
> > mysql and net-snmp's, aborted because unsuccessfully fork().
> >
> > Why does Cygwin's fork() behave unlike native Windows, since it is based on
> > CreateProcess()(http://www.cygwin.com/faq/faq_3.html#SEC77)? I'v searched a
> > post on why use two types of
> > PID(http://www.cygwin.com/ml/cygwin/2003-10/msg00139.html), does it matter?
>
> Doesn't http://www.cygwin.com/ml/cygwin/2003-10/msg00169.html explain it?
>
No. I learned why using two pids from the post, but it still doesn't explain why winpid is always increasing. Since every process is created by CreateProcess() ultimately, why doesn't it behave alike native windows process, which reuse the pid of previously exited process? After consult msdn online, I haven't found any parameters which can affect the selection of new process's pid. How could cygwin achieve this?
>
> Corinna
>
> --
> Corinna Vinschen Please, send mails regarding Cygwin to
> Cygwin Project Co-Leader mailto:cygwin AT cygwin DOT com
> Red Hat, Inc.
>
> --
> 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 -