Compartilhar via


OsConstants.SockCloexec Property

Definition

Set the close-on-exec (FD_CLOEXEC) flag on the new file descriptor created by Os#socket(int,int,int) or Os#socketpair(int,int,int,java.io.FileDescriptor,java.io.FileDescriptor).

[Android.Runtime.Register("SOCK_CLOEXEC", ApiSince=29)]
public static int SockCloexec { get; }
[<Android.Runtime.Register("SOCK_CLOEXEC", ApiSince=29)>]
static member SockCloexec : int

Property Value

Attributes

Remarks

Set the close-on-exec (FD_CLOEXEC) flag on the new file descriptor created by Os#socket(int,int,int) or Os#socketpair(int,int,int,java.io.FileDescriptor,java.io.FileDescriptor). See the description of the O_CLOEXEC flag in open(2) for reasons why this may be useful.

Applications wishing to make use of this flag on older API versions may use #O_CLOEXEC instead. On Android, O_CLOEXEC and SOCK_CLOEXEC are the same value.

Java documentation for android.system.OsConstants.SOCK_CLOEXEC.

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