Branch: Tag:

2014-10-19

2014-10-19 12:20:57 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Stdio.Fd: Fixed minor race in write().

There were some (uncommon) cases where the backend poll flags
weren't reset after a successful write.

2005: Inside #if defined(HAVE_WRITEV)
   } else {    push_int(written);    } +  /* Minor race - see below. */ +  THIS->box.revents &= ~(PIKE_BIT_FD_WRITE|PIKE_BIT_FD_WRITE_OOB);    return;       case EINTR: continue;
2051: Inside #if defined(HAVE_WRITEV)
      free(iovbase);    +  /* Minor race - see below. */ +  THIS->box.revents &= ~(PIKE_BIT_FD_WRITE|PIKE_BIT_FD_WRITE_OOB); +     if(!SAFE_IS_ZERO(& THIS->event_cbs[PIKE_FD_WRITE]))    ADD_FD_EVENTS (THIS, PIKE_BIT_FD_WRITE);    ERRNO=0;