Project

General

Profile

Feature #16597 » 0005-io-make-use-of-poll-POLLERR-flag.patch

michals (Michal Suchánek), 05/29/2020 05:52 PM

View differences:

include/ruby/io.h
# define RB_WAITFD_IN POLLIN
# define RB_WAITFD_PRI POLLPRI
# define RB_WAITFD_OUT POLLOUT
# define RB_WAITFD_ERR (POLLHUP|POLLERR)
#else
# define RB_WAITFD_IN 0x001
# define RB_WAITFD_PRI 0x002
# define RB_WAITFD_OUT 0x004
# define RB_WAITFD_ERR 0x008
#endif
#include "ruby/internal/dllexport.h"
thread.c
/* all requested events are ready if there is an error */
if (fds[0].revents & POLLERR_SET)
result |= events;
result |= events | POLLERR_SET;
return result;
}
(8-8/14)