"Magnus Hagander" <mha@sollentuna.net> writes:
>> What happens if process Y goes away between the time you
>> obtain a handle for it and the time you try to run this
>> DuplicateHandle call?
> I can put together some quick test-code for this if you need me to?
Nah, it was just a rhetorical question meant to poke a hole in the
claim that Windows can avoid race conditions by using HANDLEs.
AFAICS, don't-reuse-PIDs-too-quick has exact analogs that Windows has
to solve by ensuring it doesn't reuse HANDLEs too quick.
regards, tom lane