diff --git a/src/unix/os390-syscalls.c b/src/unix/os390-syscalls.c index 4a926c76..e8fe7c2e 100644 --- a/src/unix/os390-syscalls.c +++ b/src/unix/os390-syscalls.c @@ -308,6 +308,11 @@ int epoll_wait(uv__os390_epoll* lst, struct epoll_event* events, ev.fd = pfd->fd; ev.events = pfd->revents; + if (i == lst->size - 1) + ev.is_msg = 1; + else + ev.is_msg = 0; + if (pfd->revents & POLLIN && pfd->revents & POLLOUT) reventcount += 2; else if (pfd->revents & (POLLIN | POLLOUT)) diff --git a/src/unix/os390-syscalls.h b/src/unix/os390-syscalls.h index ea599107..5130457c 100644 --- a/src/unix/os390-syscalls.h +++ b/src/unix/os390-syscalls.h @@ -40,6 +40,7 @@ struct epoll_event { int events; int fd; + int is_msg; }; typedef struct { diff --git a/src/unix/os390.c b/src/unix/os390.c index a7305006..dce169b9 100644 --- a/src/unix/os390.c +++ b/src/unix/os390.c @@ -923,7 +923,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { continue; ep = loop->ep; - if (fd == ep->msg_queue) { + if (pe->is_msg) { os390_message_queue_handler(ep); continue; }