For the semantics to match the epoll implementation, we need a socket to
continue to appear readable/writable if you wait multiple times without
doing I/O in between (in Linux terminology: level-triggered rather than
edge-triggered). This distinction will be important for later commits.
Similar to commit
3b790d256f8 for Windows.
Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://postgr.es/m/CA%2BhUKGJAC4Oqao%3DqforhNey20J8CiG2R%3DoBPqvfR0vOJrFysGw%40mail.gmail.com
{
k_ev->ident = event->fd;
k_ev->filter = filter;
- k_ev->flags = action | EV_CLEAR;
+ k_ev->flags = action;
k_ev->fflags = 0;
k_ev->data = 0;
AccessWaitEvent(k_ev) = event;
/* For now postmaster death can only be added, not removed. */
k_ev->ident = PostmasterPid;
k_ev->filter = EVFILT_PROC;
- k_ev->flags = EV_ADD | EV_CLEAR;
+ k_ev->flags = EV_ADD;
k_ev->fflags = NOTE_EXIT;
k_ev->data = 0;
AccessWaitEvent(k_ev) = event;