diff options
author | Elliott Hughes <enh@google.com> | 2014-12-12 12:46:38 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-12-12 12:47:29 -0800 |
commit | 0d8b5c3692c36837d22c4e7d9c4d7d95f6a10235 (patch) | |
tree | 045bf28685f704b11b95c0a4838360b510fd0a90 /luni/src/main/java/android | |
parent | b6609f097c773b74ba070fab5b88b7d79c89d29f (diff) | |
download | libcore-0d8b5c3692c36837d22c4e7d9c4d7d95f6a10235.zip libcore-0d8b5c3692c36837d22c4e7d9c4d7d95f6a10235.tar.gz libcore-0d8b5c3692c36837d22c4e7d9c4d7d95f6a10235.tar.bz2 |
Add pipe2 and O_CLOEXEC to the libcore POSIX API.
@hide right now, but we should expose these at some point.
Bug: 18719692
Change-Id: I0a73606cf089ed307d1ab2916a7df28b3c45aaf0
Diffstat (limited to 'luni/src/main/java/android')
-rw-r--r-- | luni/src/main/java/android/system/Os.java | 4 | ||||
-rw-r--r-- | luni/src/main/java/android/system/OsConstants.java | 1 |
2 files changed, 4 insertions, 1 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(); |