< prev index next >
src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java
Print this page
rev 50258 : [mq]: 8203369-Check-for-both-EAGAIN-and-EWOULDBLOCK-error-codes
*** 1,7 ****
/*
! * Copyright (c) 2008, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2008, 2018, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 317,327 ****
// read from inotify
try {
bytesRead = read(ifd, address, BUFFER_SIZE);
} catch (UnixException x) {
! if (x.errno() != EAGAIN)
throw x;
bytesRead = 0;
}
// iterate over buffer to decode events
--- 317,327 ----
// read from inotify
try {
bytesRead = read(ifd, address, BUFFER_SIZE);
} catch (UnixException x) {
! if (x.errno() != EAGAIN && x.errno() != EWOULDBLOCK)
throw x;
bytesRead = 0;
}
// iterate over buffer to decode events
*** 365,375 ****
read(socketpair[0], address, BUFFER_SIZE);
boolean shutdown = processRequests();
if (shutdown)
break;
} catch (UnixException x) {
! if (x.errno() != UnixConstants.EAGAIN)
throw x;
}
}
}
} catch (UnixException x) {
--- 365,375 ----
read(socketpair[0], address, BUFFER_SIZE);
boolean shutdown = processRequests();
if (shutdown)
break;
} catch (UnixException x) {
! if (x.errno() != EAGAIN && x.errno() != EWOULDBLOCK)
throw x;
}
}
}
} catch (UnixException x) {
< prev index next >