summaryrefslogtreecommitdiffstats
path: root/luni/src/main/java/libcore/io/Posix.java
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2014-11-27 17:10:45 +0000
committerNeil Fuller <nfuller@google.com>2014-11-28 09:25:03 +0000
commit1791f6be1bd2733babb0c862ad8509f4c847b48f (patch)
tree942fdd30ceb6563de11d318cc2a54c53755300d1 /luni/src/main/java/libcore/io/Posix.java
parent9250fd718bd449cab13681cbc2b31bf65569d31f (diff)
downloadlibcore-1791f6be1bd2733babb0c862ad8509f4c847b48f.zip
libcore-1791f6be1bd2733babb0c862ad8509f4c847b48f.tar.gz
libcore-1791f6be1bd2733babb0c862ad8509f4c847b48f.tar.bz2
Fix crash in selector.wakeup() with closed selector
Selector.wakeup() can throw an undeclared IOException (from native code). This is not compatible with the signature of wakeup(). In prior Android releases no exception is thrown in this case. This change reverts the behavior to the same as prior Android releases. Many thanks to diddysbestbud@ for the report. Bug: https://code.google.com/p/android/issues/detail?id=80785 Bug: 18548071 Change-Id: I5421e8a0ae1fdf2cde9cb635dae56b4fd02b6ac4
Diffstat (limited to 'luni/src/main/java/libcore/io/Posix.java')
-rw-r--r--luni/src/main/java/libcore/io/Posix.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/luni/src/main/java/libcore/io/Posix.java b/luni/src/main/java/libcore/io/Posix.java
index f5eaaa3..cab67e8 100644
--- a/luni/src/main/java/libcore/io/Posix.java
+++ b/luni/src/main/java/libcore/io/Posix.java
@@ -61,7 +61,7 @@ public final class Posix implements Os {
public native void fchown(FileDescriptor fd, int uid, int gid) throws ErrnoException;
public native int fcntlVoid(FileDescriptor fd, int cmd) throws ErrnoException;
public native int fcntlLong(FileDescriptor fd, int cmd, long arg) throws ErrnoException;
- public native int fcntlFlock(FileDescriptor fd, int cmd, StructFlock arg) throws ErrnoException;
+ public native int fcntlFlock(FileDescriptor fd, int cmd, StructFlock arg) throws ErrnoException, InterruptedIOException;
public native void fdatasync(FileDescriptor fd) throws ErrnoException;
public native StructStat fstat(FileDescriptor fd) throws ErrnoException;
public native StructStatVfs fstatvfs(FileDescriptor fd) throws ErrnoException;