From 0d9e29baa0839966dac993cdf0ea541bb58d7f37 Mon Sep 17 00:00:00 2001 From: Guillaume Lessard Date: Tue, 21 Jul 2026 18:31:33 -0700 Subject: [PATCH] Fix some doc-comments --- Proposals/0007-FileDescriptor-dup3-pipe2.md | 1 + Sources/System/FileOperations.swift | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Proposals/0007-FileDescriptor-dup3-pipe2.md b/Proposals/0007-FileDescriptor-dup3-pipe2.md index ba76324..202e088 100644 --- a/Proposals/0007-FileDescriptor-dup3-pipe2.md +++ b/Proposals/0007-FileDescriptor-dup3-pipe2.md @@ -75,6 +75,7 @@ struct FileDescriptor { /// Pass `false` to try only once and throw an error upon interruption. /// - Returns: The new file descriptor. /// + /// If the `target` descriptor is the same as `self`, then EINVAL is thrown. /// If the `target` descriptor is already in use, then it is first /// deallocated as if a close(2) call had been done first. /// diff --git a/Sources/System/FileOperations.swift b/Sources/System/FileOperations.swift index d920f93..e8c27ff 100644 --- a/Sources/System/FileOperations.swift +++ b/Sources/System/FileOperations.swift @@ -415,7 +415,7 @@ extension FileDescriptor { /// Pass `false` to try only once and throw an error upon interruption. /// - Returns: The new file descriptor. /// - /// If the `target` descriptor the same as `self`, then EINVAL is thrown. + /// If the `target` descriptor is the same as `self`, then EINVAL is thrown. /// If the `target` descriptor is already in use, then it is first /// deallocated as if a close(2) call had been done first. /// @@ -524,9 +524,9 @@ extension FileDescriptor { /// interprocess communication. /// /// NOTE: This overload called with an empty option set is not necessarily - /// equivalent to calling the overload with no options. On Windows, this - /// overload with empty options disables the `closeOnExec` behaviour, - /// which is enabled by the overload without options. + /// equivalent to calling the overload with no options. On Windows, the + /// no-parameter `pipe()` overload enables the `.closeOnExec` behaviour, + /// but this overload disables it when called with an empty option set. /// /// - Parameters: /// - options: The behavior for creating the pipe.