lkml.org 
[lkml]   [1998]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPID sequences
Hello all,
I have been meaning to post this for about a year but I keep
forgetting :-( I'm waiting on something to finish running, and I
finally remembered.

I have seen severl posts (over the last couple of years) where
people complained about either performance or security problems related
to generating PID numbers for child processes at fork() time. There is
the assumption that PID numbers increase, skipping over in-use PIDs,
and then wrap at 32K. I dont think Digital Unix does it this way:

halfpint> bash -c 'for x in 1 2 3 4 5; do /bin/sh -c '\''echo $$'\''; done'
4476
4300
3707
4243
3843

This looks almost random, and it does not seem to break anything.
I just wanted to let people know that if we wanted to use some other
scheme for generating PIDs, there is some precident for doing so.

Thanks,

Jim

--
----------------------------------------------------------------------------
Jim Nance Avant! Corporation
(919) 941-6655 Do you have sweet iced tea? jim_nance@avanticorp.com
No, but theres sugar on the table.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:41    [from the cache]
©2003-2011 Jasper Spaans