Language

Os.Dup2(FileDescriptor, Int32) Method

Definition

See dup2(2).

[Android.Runtime.Register("dup2", "(Ljava/io/FileDescriptor;I)Ljava/io/FileDescriptor;", "")]
public static Java.IO.FileDescriptor? Dup2(Java.IO.FileDescriptor? oldFd, int newFd);
[<Android.Runtime.Register("dup2", "(Ljava/io/FileDescriptor;I)Ljava/io/FileDescriptor;", "")>]
static member Dup2 : Java.IO.FileDescriptor * int -> Java.IO.FileDescriptor

Parameters

oldFd
FileDescriptor

The file descriptor to duplicate.

newFd
Int32

The descriptor number to use for the duplicate, replacing that descriptor if it is open.

Returns

A descriptor for the requested descriptor number, referring to the same open file description as oldFd.

Attributes

Exceptions

Remarks

See dup2(2).

Java documentation for android.system.Os.dup2(java.io.FileDescriptor, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to