7060790: (fs) FileSystem.newWatchService error message confusing when maximum inotify descriptors reached
Reviewed-by: forax
This commit is contained in:
parent
ca2767a5d3
commit
cf6e15a2e3
jdk/src/solaris
@ -58,7 +58,10 @@ class LinuxWatchService
|
||||
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
|
||||
|
@ -108,6 +108,7 @@ int main(int argc, const char* argv[]) {
|
||||
DEF(EROFS);
|
||||
DEF(ENODATA);
|
||||
DEF(ERANGE);
|
||||
DEF(EMFILE);
|
||||
|
||||
// flags used with openat/unlinkat/etc.
|
||||
#if defined(AT_SYMLINK_NOFOLLOW) && defined(AT_REMOVEDIR)
|
||||
|
Loading…
x
Reference in New Issue
Block a user