A customer discovered a bug where terminating a process did not close the handles that the process had open, resulting in their emergency cleanup code not working:
Their workaround was to insert a call to WaitForSingleObject(processHandle, 500) before deleting the file. The customer wanted to know whether they discovered a bug in TerminateProcess, and they were concerned that their workaround could add up to a half second to their cleanup code, during which the end user is sitting there waiting for everything to clean up.
As MSDN notes,
TerminateProcess initiates termination and returns immediately. This stops execution of all threads within the process and requests cancellation of all pending I/O. The terminated process cannot exit until all pending I/O has been completed or canceled.
Read more: The old new thing