mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8203369: Check for both EAGAIN and EWOULDBLOCK error codes
Reviewed-by: alanb
This commit is contained in:
parent
a9d29cf43a
commit
33b7f68964
7 changed files with 22 additions and 23 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
|
@ -319,7 +319,7 @@ class LinuxWatchService
|
|||
try {
|
||||
bytesRead = read(ifd, address, BUFFER_SIZE);
|
||||
} catch (UnixException x) {
|
||||
if (x.errno() != EAGAIN)
|
||||
if (x.errno() != EAGAIN && x.errno() != EWOULDBLOCK)
|
||||
throw x;
|
||||
bytesRead = 0;
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ class LinuxWatchService
|
|||
if (shutdown)
|
||||
break;
|
||||
} catch (UnixException x) {
|
||||
if (x.errno() != UnixConstants.EAGAIN)
|
||||
if (x.errno() != EAGAIN && x.errno() != EWOULDBLOCK)
|
||||
throw x;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue