diff options
author | Alex Dupre <ale@FreeBSD.org> | 2018-12-27 09:52:52 +0000 |
---|---|---|
committer | Alex Dupre <ale@FreeBSD.org> | 2018-12-27 09:52:52 +0000 |
commit | ad43f6fd6e9b495c737d45e14f563c63f298c083 (patch) | |
tree | 2053bbf6e05831e38264f5a50b41809e5a19bfc1 /java/openjdk8/files/patch-jdk-src-solaris-classes-sun-nio-fs-BsdFileSystem.java | |
parent | security/pwned-check: Remove spaces from sample config file (diff) |
Add a WatchService implementation backed by kqueue,
leveraging the libinotify wrapper.
It's still possible to use the polling watchservice,
by defining the following system property:
sun.nio.fs.watchservice=polling
Notes
Notes:
svn path=/head/; revision=488523
Diffstat (limited to 'java/openjdk8/files/patch-jdk-src-solaris-classes-sun-nio-fs-BsdFileSystem.java')
-rw-r--r-- | java/openjdk8/files/patch-jdk-src-solaris-classes-sun-nio-fs-BsdFileSystem.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/java/openjdk8/files/patch-jdk-src-solaris-classes-sun-nio-fs-BsdFileSystem.java b/java/openjdk8/files/patch-jdk-src-solaris-classes-sun-nio-fs-BsdFileSystem.java new file mode 100644 index 000000000000..9fd4b9b78818 --- /dev/null +++ b/java/openjdk8/files/patch-jdk-src-solaris-classes-sun-nio-fs-BsdFileSystem.java @@ -0,0 +1,15 @@ +--- ./jdk/src/solaris/classes/sun/nio/fs/BsdFileSystem.java.orig 2018-12-13 14:23:02.834223000 +0100 ++++ ./jdk/src/solaris/classes/sun/nio/fs/BsdFileSystem.java 2018-12-13 17:34:09.359192000 +0100 +@@ -45,8 +45,10 @@ + public WatchService newWatchService() + throws IOException + { +- // use polling implementation until we implement a BSD/kqueue one +- return new PollingWatchService(); ++ if (System.getProperty("sun.nio.fs.watchservice", "").equals("polling")) ++ return new PollingWatchService(); ++ else ++ return new LinuxWatchService(this); // use the linux inotify implementation that wraps the kqueue calls + } + + // lazy initialization of the list of supported attribute views |