summaryrefslogtreecommitdiffstats
path: root/luni/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'luni/src/main/java')
-rw-r--r--luni/src/main/java/android/system/Os.java4
-rw-r--r--luni/src/main/java/android/system/OsConstants.java1
-rw-r--r--luni/src/main/java/java/nio/SelectorImpl.java2
-rw-r--r--luni/src/main/java/libcore/io/ForwardingOs.java2
-rw-r--r--luni/src/main/java/libcore/io/Os.java2
-rw-r--r--luni/src/main/java/libcore/io/Posix.java2
6 files changed, 8 insertions, 5 deletions
diff --git a/luni/src/main/java/android/system/Os.java b/luni/src/main/java/android/system/Os.java
index 9d6dc1b..7f73a85 100644
--- a/luni/src/main/java/android/system/Os.java
+++ b/luni/src/main/java/android/system/Os.java
@@ -302,7 +302,9 @@ public final class Os {
/**
* See <a href="http://man7.org/linux/man-pages/man2/pipe.2.html">pipe(2)</a>.
*/
- public static FileDescriptor[] pipe() throws ErrnoException { return Libcore.os.pipe(); }
+ public static FileDescriptor[] pipe() throws ErrnoException { return Libcore.os.pipe2(0); }
+
+ /** @hide */ public static FileDescriptor[] pipe2(int flags) throws ErrnoException { return Libcore.os.pipe2(flags); }
/**
* See <a href="http://man7.org/linux/man-pages/man2/poll.2.html">poll(2)</a>.
diff --git a/luni/src/main/java/android/system/OsConstants.java b/luni/src/main/java/android/system/OsConstants.java
index c758eb7..55870ec 100644
--- a/luni/src/main/java/android/system/OsConstants.java
+++ b/luni/src/main/java/android/system/OsConstants.java
@@ -331,6 +331,7 @@ public final class OsConstants {
public static final int NI_NUMERICSERV = placeholder();
public static final int O_ACCMODE = placeholder();
public static final int O_APPEND = placeholder();
+ /** @hide */ public static final int O_CLOEXEC = placeholder();
public static final int O_CREAT = placeholder();
public static final int O_EXCL = placeholder();
public static final int O_NOCTTY = placeholder();
diff --git a/luni/src/main/java/java/nio/SelectorImpl.java b/luni/src/main/java/java/nio/SelectorImpl.java
index 45406b1..5e2a2b1 100644
--- a/luni/src/main/java/java/nio/SelectorImpl.java
+++ b/luni/src/main/java/java/nio/SelectorImpl.java
@@ -94,7 +94,7 @@ final class SelectorImpl extends AbstractSelector {
* configure the pipe so we can fully drain it without blocking.
*/
try {
- FileDescriptor[] pipeFds = Libcore.os.pipe();
+ FileDescriptor[] pipeFds = Libcore.os.pipe2(0);
wakeupIn = pipeFds[0];
wakeupOut = pipeFds[1];
IoUtils.setBlocking(wakeupIn, false);
diff --git a/luni/src/main/java/libcore/io/ForwardingOs.java b/luni/src/main/java/libcore/io/ForwardingOs.java
index 584fd58..9fd4322 100644
--- a/luni/src/main/java/libcore/io/ForwardingOs.java
+++ b/luni/src/main/java/libcore/io/ForwardingOs.java
@@ -113,7 +113,7 @@ public class ForwardingOs implements Os {
public void munlock(long address, long byteCount) throws ErrnoException { os.munlock(address, byteCount); }
public void munmap(long address, long byteCount) throws ErrnoException { os.munmap(address, byteCount); }
public FileDescriptor open(String path, int flags, int mode) throws ErrnoException { return os.open(path, flags, mode); }
- public FileDescriptor[] pipe() throws ErrnoException { return os.pipe(); }
+ public FileDescriptor[] pipe2(int flags) throws ErrnoException { return os.pipe2(flags); }
public int poll(StructPollfd[] fds, int timeoutMs) throws ErrnoException { return os.poll(fds, timeoutMs); }
public void posix_fallocate(FileDescriptor fd, long offset, long length) throws ErrnoException { os.posix_fallocate(fd, offset, length); }
public int prctl(int option, long arg2, long arg3, long arg4, long arg5) throws ErrnoException { return os.prctl(option, arg2, arg3, arg4, arg5); };
diff --git a/luni/src/main/java/libcore/io/Os.java b/luni/src/main/java/libcore/io/Os.java
index 9f080a6..ad0767e 100644
--- a/luni/src/main/java/libcore/io/Os.java
+++ b/luni/src/main/java/libcore/io/Os.java
@@ -105,7 +105,7 @@ public interface Os {
public void munlock(long address, long byteCount) throws ErrnoException;
public void munmap(long address, long byteCount) throws ErrnoException;
public FileDescriptor open(String path, int flags, int mode) throws ErrnoException;
- public FileDescriptor[] pipe() throws ErrnoException;
+ public FileDescriptor[] pipe2(int flags) throws ErrnoException;
/* TODO: if we used the non-standard ppoll(2) behind the scenes, we could take a long timeout. */
public int poll(StructPollfd[] fds, int timeoutMs) throws ErrnoException;
public void posix_fallocate(FileDescriptor fd, long offset, long length) throws ErrnoException;
diff --git a/luni/src/main/java/libcore/io/Posix.java b/luni/src/main/java/libcore/io/Posix.java
index cab67e8..73b0dc4 100644
--- a/luni/src/main/java/libcore/io/Posix.java
+++ b/luni/src/main/java/libcore/io/Posix.java
@@ -107,7 +107,7 @@ public final class Posix implements Os {
public native void munlock(long address, long byteCount) throws ErrnoException;
public native void munmap(long address, long byteCount) throws ErrnoException;
public native FileDescriptor open(String path, int flags, int mode) throws ErrnoException;
- public native FileDescriptor[] pipe() throws ErrnoException;
+ public native FileDescriptor[] pipe2(int flags) throws ErrnoException;
public native int poll(StructPollfd[] fds, int timeoutMs) throws ErrnoException;
public native void posix_fallocate(FileDescriptor fd, long offset, long length) throws ErrnoException;
public native int prctl(int option, long arg2, long arg3, long arg4, long arg5) throws ErrnoException;