Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <00F8D6E8AB0DD3118F1A006008186C9611F7FF@server1.axonet.com.au>
From: Andrew Dalgleish <andrewd@axonet.com.au>
To: "'cygwin@sources.redhat.com'" <cygwin@sources.redhat.com>
Subject: RE: Extending cygwin's process table
Date: Thu, 20 Jul 2000 18:24:21 +1000
X-Priority: 3
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.0.1458.49)
Content-Type: text/plain



> -----Original Message-----
> From:	Chris Faylor [SMTP:cgf@cygnus.com]
> Sent:	Thursday, July 20, 2000 04:22
> To:	cygwin@sources.redhat.com
> Subject:	Re: Extending cygwin's process table
> 
> On Wed, Jul 19, 2000 at 09:04:55AM -0400, Noel L Yap wrote:
> >cgf@cygnus.com on 2000.07.18 23:43:19
> >>I'm also toying with trying to more closely tie cygwin pids to
> windows
> >>pids.
> >
> >IMHO, this'd be great.
> >
> >>Is anyone going to be bothered if pid creation is not monotonic?  By
> >>that I mean, parent pid 1000 may not create child pid 1001.  It may
> >>create child pid 27.
> >
> >I don't think anything should be relying on this behaviour since it's
> not always
> >satisfied (ie when ppid is near the max pid allowed).
> 
> Yeah, I certainly know this.  I was just wondering if people would be
> shocked
> and outraged by any new "random" behavior.
[Andrew Dalgleish]  

I'd say mix 'em up, for two reasons:


1.
Some security conscious OSs generate random PIDs to prevent certain
types of attack.
Think about /tmp file predictions.
If you know process FOO has a PID of N, and its child creates a file
/tmp/son-of-foo.$$, you could create a symlink from
/tmp/son-of-foo.(N+1) to /etc/passwd.

2.
Unless you can guarantee that the cygwin PIDs are the same as windows
PIDs, I would suggest that you make them as different as possible to
discourage people from confusing the two.
If they are the same 99% of the time, some fool will think they are
*always* the same and come to rely on it.
Then you'll get posts of "but it works on NT".

Regards,
Andrew Dalgleish


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

