Russell Nelson writes:
one Maildir dir will be unique in all of them." Other bits of code
assume that "No pid will be reused in the same second".
This will end up affecting much more stuff. Plenty of code relies on the
combination of pid_t+time_t being a locally-unique ID.
Now, what I don't understand is this. This is supposed to be all about
sooper, dooper, security, right? Now, I don't see how monotonically
increasing pids have any security-related issues, unless there's already an
existing, potential, exploit; an existing defect somewhere else which can be
used, in conjunction with monotonical pids, to manufacture a exploitable
race condition.
Now, there's nothing wrong with using a random pid generator to minimize the
possibility of generating an exploitable race condition. Nothing wrong at
all.
Except that, it seems to me now, having different processes sharing the same
pid within such a short period of time would certainly now create
exploitable race conditions of their very own.
So you're not really getting anything of value at all. You're merely
replacing one potential race condition, with another one. So what exactly
did we accomplish, here?