Golang 1.10.x started using epoll_pwait instead of regular epoll_wait and the golang-httpserver app does not work anymore. This patch adds basic implementation of epoll_pwait that returns error if non-null sigmask was passed otherwise delegates to epoll_wait.
Signed-off-by: Waldemar Kozaczuk <jwkozac...@gmail.com> --- linux.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/linux.cc b/linux.cc index 25d28ee..61a6793 100644 --- a/linux.cc +++ b/linux.cc @@ -345,6 +345,17 @@ static int pselect6(int nfds, fd_set *readfds, fd_set *writefds, return pselect(nfds, readfds, writefds, exceptfds, timeout_ts, NULL); } +static int epoll_pwait(int epfd, struct epoll_event *events, int maxevents, + int timeout_ms, void *sig) +{ + if(sig) { + WARN_ONCE("epoll_pwait(): unimplemented with not-null sigmask\n"); + errno = ENOSYS; + return -1; + } + + return epoll_wait(epfd, events, maxevents, timeout_ms); +} long syscall(long number, ...) { @@ -405,6 +416,7 @@ long syscall(long number, ...) SYSCALL4(pread64, int, void *, size_t, off_t); SYSCALL2(ftruncate, int, off_t); SYSCALL1(fsync, int); + SYSCALL5(epoll_pwait, int, struct epoll_event *, int, int, void*); } debug_always("syscall(): unimplemented system call %d\n", number); -- 2.7.4 -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.