--- a/jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java Sat Aug 27 02:17:33 2011 -0700
+++ b/jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java Sat Aug 27 15:40:45 2011 +0100
@@ -58,7 +58,10 @@
try {
ifd = inotifyInit();
} catch (UnixException x) {
- throw new IOException(x.errorString());
+ String msg = (x.errno() == EMFILE) ?
+ "User limit of inotify instances reached or too many open files" :
+ x.errorString();
+ throw new IOException(msg);
}
// configure inotify to be non-blocking