• Tom Lane's avatar
    Assert that WaitLatch's timeout is not more than INT_MAX milliseconds. · 14ddff44
    Tom Lane authored
    The behavior with larger values is unspecified by the Single Unix Spec.
    It appears that BSD-derived kernels report EINVAL, although Linux does not.
    If waiting for longer intervals is desired, the calling code has to do
    something to limit the delay; we can't portably fix it here since "long"
    may not be any wider than "int" in the first place.
    
    Part of response to bug #7670, though this change doesn't fix that
    (in fact, it converts the problem from an ERROR into an Assert failure).
    No back-patch since it's just an assertion addition.
    14ddff44
unix_latch.c 19 KB