[PATCH v7 3/4] io: Add closefrom [BZ #10353]

Florian Weimer fweimer@redhat.com
Wed Jul 7 10:39:56 GMT 2021


* Adhemerval Zanella via Libc-alpha:

> diff --git a/manual/llio.texi b/manual/llio.texi
> index ea6d34dd5a..d1ed9e6490 100644
> --- a/manual/llio.texi
> +++ b/manual/llio.texi
> @@ -332,6 +332,16 @@ The kernel does not implement the required functionality.
>  @end table
>  @end deftypefun
>  
> +@deftypefun void closefrom (int @var{lowfd})
> +@standards{GNU, unistd.h}
> +@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{@acsfd{}}}
> +
> +The function @code{closefrom} closes all file descriptors larger than or equal
> +to @var{lowfd} then @var{lowfd}.  This function is similar to call
> +@code{close} applied to the specified file descriptor range.
> +
> +Already closed file descriptors are ignored.
> +@end deftypefun

Suggest: “This function is similar to calling  @code{close} for all open
file descriptors not less than @var{lowfd}.”

Code changes look okay to me.

Thanks,
Florian



More information about the Libc-alpha mailing list