• Tom Lane's avatar
    Fix Windows implementation of PGSemaphoreLock. · ada8fa08
    Tom Lane authored
    The original coding failed to reset ImmediateInterruptOK before returning,
    which would potentially allow a subsequent query-cancel interrupt to be
    accepted at an unsafe point.  This is a really nasty bug since it's so hard
    to predict the consequences, but they could be unpleasant.
    
    Also, ensure that signal handlers are serviced before this function
    returns, even if the semaphore is already set.  This should make the
    behavior more like Unix.
    
    Back-patch to all supported versions.
    ada8fa08
win32_sema.c 4.74 KB