PID sequences

Jim Nance (jlnance@avanticorp.com)
Mon, 23 Feb 1998 17:49:07 -0500


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