diff --git a/jdk/src/java.base/linux/native/libnio/ch/EPollArrayWrapper.c b/jdk/src/java.base/linux/native/libnio/ch/EPollArrayWrapper.c index c7b391f930a..12b1c8524bc 100644 --- a/jdk/src/java.base/linux/native/libnio/ch/EPollArrayWrapper.c +++ b/jdk/src/java.base/linux/native/libnio/ch/EPollArrayWrapper.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -53,7 +53,7 @@ iepoll(int epfd, struct epoll_event *events, int numfds, jlong timeout) start = t.tv_sec * 1000 + t.tv_usec / 1000; for (;;) { - int res = epoll_wait(epfd, events, numfds, timeout); + int res = epoll_wait(epfd, events, numfds, remaining); if (res < 0 && errno == EINTR) { if (remaining >= 0) { gettimeofday(&t, NULL); diff --git a/jdk/src/java.base/solaris/native/libnio/ch/DevPollArrayWrapper.c b/jdk/src/java.base/solaris/native/libnio/ch/DevPollArrayWrapper.c index 962f5e49263..6860a167bbc 100644 --- a/jdk/src/java.base/solaris/native/libnio/ch/DevPollArrayWrapper.c +++ b/jdk/src/java.base/solaris/native/libnio/ch/DevPollArrayWrapper.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -94,6 +94,7 @@ idevpoll(jint wfd, int dpctl, struct dvpoll a) return 0; } start = now; + a.dp_timeout = remaining; } } else { return res;