On Wed, Apr 05, 2006 at 03:20:47AM -0400, [EMAIL PROTECTED] wrote: > TerminateProcess takes a HANDLE, not a process identifier. Yes, they > provide the "kill" primitive, but only as a compatibility measure. A > "good" Windows process, should maintain a HANDLE to the process, and > kill the process using the HANDLE. This way, there is no race. The > HANDLE is also how you wait for the process to terminate normally.
Which presents the solution, we should use the HANDLE on windows rather than the process identifier. > I prefer the "Redmond" way, in that I find UNIX's use of integer > identifiers to be encouraging of race conditions. UNIX requires hacks > like minimizing PID reuse, because UNIX is the one that is broken. :-) Eh? A HANDLE is (or can be mapped to) an integer too. I don't see anything on that page about handle reuse. If you run a machine long enough I'm sure it can be reused also... Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.
signature.asc
Description: Digital signature