1. 17
  1. 2

    A while ago I discovered a similar bug on MacOS with signal delivery. That is, I had code that would listen for signals via kqueue, and once one was received, use sigtimedwait() (with a zero timeout) to retrieve the signal data. The problem was that kqueue would indicate the signal before it was available for sigtimedwait(). Demo and more complete explanation here.