mirror of
https://github.com/apple/swift-system
synced 2026-11-28 05:14:33 +00:00
Improve doc-comments
This commit is contained in:
1 parent
61280ab365
commit
814d09c7ea
2 files changed
+25
-34
No files matched your search
@@ -306,12 +306,10 @@ extension FileDescriptor {
|
||||
///
|
||||
/// Normally, file descriptors remain open
|
||||
/// across calls to the `exec(2)` family of functions.
|
||||
/// If you specify this option,
|
||||
/// the file descriptor is closed when replacing this process
|
||||
/// with another process.
|
||||
/// If you specify this option, the system closes the file
|
||||
/// descriptor when replacing this process with another process.
|
||||
///
|
||||
/// The state of the file
|
||||
/// descriptor flags can be inspected using `F_GETFD`,
|
||||
/// You can inspect the file descriptor flag state using `F_GETFD`,
|
||||
/// as described in the `fcntl(2)` man page.
|
||||
///
|
||||
/// The corresponding C constant is `O_CLOEXEC`.
|
||||
@@ -342,8 +340,8 @@ extension FileDescriptor {
|
||||
public init(rawValue: CInt) { self.rawValue = rawValue }
|
||||
|
||||
#if !os(Windows)
|
||||
/// Indicates that all
|
||||
/// subsequent input and output operations on the pipe's file descriptors will be nonblocking.
|
||||
/// Indicates that all subsequent input and output operations
|
||||
/// on the pipe's file descriptors will be nonblocking.
|
||||
///
|
||||
/// The corresponding C constant is `O_NONBLOCK`.
|
||||
@_alwaysEmitIntoClient
|
||||
@@ -357,12 +355,10 @@ extension FileDescriptor {
|
||||
///
|
||||
/// Normally, file descriptors remain open
|
||||
/// across calls to the `exec(2)` family of functions.
|
||||
/// If you specify this option,
|
||||
/// the file descriptor is closed when replacing this process
|
||||
/// with another process.
|
||||
/// If you specify this option, the system closes the file
|
||||
/// descriptor when replacing this process with another process.
|
||||
///
|
||||
/// The state of the file
|
||||
/// descriptor flags can be inspected using `F_GETFD`,
|
||||
/// You can inspect the file descriptor flag state using `F_GETFD`,
|
||||
/// as described in the `fcntl(2)` man page.
|
||||
///
|
||||
/// The corresponding C constant is `O_CLOEXEC`.
|
||||
@@ -378,12 +374,10 @@ extension FileDescriptor {
|
||||
///
|
||||
/// Normally, file descriptors remain open
|
||||
/// across calls to the `fork(2)` function.
|
||||
/// If you specify this option,
|
||||
/// the file descriptor is closed when forking this process
|
||||
/// into another process.
|
||||
/// If you specify this option, the system closes the file
|
||||
/// descriptor when forking this process into another process.
|
||||
///
|
||||
/// The state of the file
|
||||
/// descriptor flags can be inspected using `F_GETFD`,
|
||||
/// You can inspect the file descriptor flag state using `F_GETFD`,
|
||||
/// as described in the `fcntl(2)` man page.
|
||||
///
|
||||
/// The corresponding C constant is `O_CLOFORK`.
|
||||
@@ -419,12 +413,10 @@ extension FileDescriptor {
|
||||
///
|
||||
/// Normally, file descriptors remain open
|
||||
/// across calls to the `exec(2)` family of functions.
|
||||
/// If you specify this option,
|
||||
/// the file descriptor is closed when replacing this process
|
||||
/// with another process.
|
||||
/// If you specify this option, the system closes the file
|
||||
/// descriptor when replacing this process with another process.
|
||||
///
|
||||
/// The state of the file
|
||||
/// descriptor flags can be inspected using `F_GETFD`,
|
||||
/// You can inspect the file descriptor flag state using `F_GETFD`,
|
||||
/// as described in the `fcntl(2)` man page.
|
||||
///
|
||||
/// The corresponding C constant is `O_CLOEXEC`.
|
||||
@@ -440,12 +432,10 @@ extension FileDescriptor {
|
||||
///
|
||||
/// Normally, file descriptors remain open
|
||||
/// across calls to the `fork(2)` function.
|
||||
/// If you specify this option,
|
||||
/// the file descriptor is closed when forking this process
|
||||
/// into another process.
|
||||
/// If you specify this option, the system closes the file
|
||||
/// descriptor when forking this process into another process.
|
||||
///
|
||||
/// The state of the file
|
||||
/// descriptor flags can be inspected using `F_GETFD`,
|
||||
/// You can inspect the file descriptor flag state using `F_GETFD`,
|
||||
/// as described in the `fcntl(2)` man page.
|
||||
///
|
||||
/// The corresponding C constant is `O_CLOFORK`.
|
||||
|
||||
@@ -406,12 +406,12 @@ extension FileDescriptor {
|
||||
try _duplicate(as: target, options: 0, retryOnInterrupt: retryOnInterrupt).get()
|
||||
}
|
||||
|
||||
/// Duplicates this file descriptor and return the newly created copy.
|
||||
/// Duplicate this file descriptor and return the newly created copy.
|
||||
///
|
||||
/// - Parameters:
|
||||
/// - `target`: The desired target file descriptor.
|
||||
/// - `options`: The behavior for creating the target file descriptor.
|
||||
/// - retryOnInterrupt: Whether to retry the write operation
|
||||
/// - target: The desired target file descriptor.
|
||||
/// - options: The behavior for creating the target file descriptor.
|
||||
/// - retryOnInterrupt: Whether to retry the operation
|
||||
/// if it throws ``Errno/interrupted``. The default is `true`.
|
||||
/// Pass `false` to try only once and throw an error upon interruption.
|
||||
/// - Returns: The new file descriptor.
|
||||
@@ -428,8 +428,8 @@ extension FileDescriptor {
|
||||
/// a different object reference to the file must be obtained by issuing an
|
||||
/// additional call to `open`.
|
||||
///
|
||||
/// However, each file descriptor maintains its own close-on-exec flag.
|
||||
///
|
||||
/// However, each file descriptor maintains its own close-on-exec and
|
||||
/// close-on-fork flags.
|
||||
///
|
||||
/// The corresponding C function is `dup3`.
|
||||
@discardableResult
|
||||
@@ -500,7 +500,8 @@ extension FileDescriptor {
|
||||
try _pipe(options: 0).get()
|
||||
}
|
||||
|
||||
/// Creates a unidirectional data channel, which can be used for interprocess communication.
|
||||
/// Creates a unidirectional data channel, which can be used for
|
||||
/// interprocess communication.
|
||||
///
|
||||
/// - Parameters:
|
||||
/// - options: The behavior for creating the pipe.
|
||||
|
||||
Reference in new issue
Block a user