diff mbox series

manual: add dup3

Message ID xny18hz6xr.fsf@greed.delorie.com
State New
Headers show
Series manual: add dup3 | expand

Commit Message

DJ Delorie May 10, 2024, 9:35 p.m. UTC

Comments

Florian Weimer May 11, 2024, 9:23 a.m. UTC | #1
* DJ Delorie:

> diff --git a/manual/llio.texi b/manual/llio.texi
> index 2086e04afd..675d30ba2b 100644
> --- a/manual/llio.texi
> +++ b/manual/llio.texi
> @@ -3520,6 +3520,14 @@ middle of calling @code{dup2} at which @var{new} is closed and not yet a
>  duplicate of @var{old}.
>  @end deftypefun
>  
> +@deftypefun int dup3 (int @var{old}, int @var{new}, int @var{flags})
> +@standards{Linux, unistd.h}
> +@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}

I think you can drop the @prelim{} if you want.

> +This function is the same as @code{dup2} but creates the new
> +descriptor as if it had been opened with flags @var{flags}.  The only
> +allowed flag is @code{O_CLOEXEC}.
> +@end deftypefun

Looks good.

Reviewed-by: Florian Weimer <fweimer@redhat.com>

Thanks,
Florian
diff mbox series

Patch

diff --git a/manual/llio.texi b/manual/llio.texi
index 2086e04afd..675d30ba2b 100644
--- a/manual/llio.texi
+++ b/manual/llio.texi
@@ -3520,6 +3520,14 @@  middle of calling @code{dup2} at which @var{new} is closed and not yet a
 duplicate of @var{old}.
 @end deftypefun
 
+@deftypefun int dup3 (int @var{old}, int @var{new}, int @var{flags})
+@standards{Linux, unistd.h}
+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
+This function is the same as @code{dup2} but creates the new
+descriptor as if it had been opened with flags @var{flags}.  The only
+allowed flag is @code{O_CLOEXEC}.
+@end deftypefun
+
 @deftypevr Macro int F_DUPFD
 @standards{POSIX.1, fcntl.h}
 This macro is used as the @var{command} argument to @code{fcntl}, to