From 16b25c8a426c285c85c24db115c677218d287da9 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 21 Aug 2015 20:43:01 +0200 Subject: add and use xclose and xfclose, we do not want close or fclose to be ignored because a singal interrupts it. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- doc/info/mds.texinfo | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'doc/info') diff --git a/doc/info/mds.texinfo b/doc/info/mds.texinfo index a2ad809..e6ac9db 100644 --- a/doc/info/mds.texinfo +++ b/doc/info/mds.texinfo @@ -6183,6 +6183,26 @@ Stores the time of an unspecified monotonic clock into @code{time_slot}. Returns zero on and only on success. +@item @code{xclose} [(@code{int fd}) @arrow{} @code{void}] +@fnindex @code{xclose} +@cpindex Clean up +Wrapper for the @code{close} function. This wrapper +will retry if the call is interrupted by a signal. +It will however not return value, but you can detect +if an error have occured by inspecting @code{errno}, +it is guaranteed to be zero on success and otherwise +indicate the error that occurred. + +@item @code{xfclose} [(@code{FILE* f}) @arrow{} @code{void}] +@fnindex @code{xfclose} +@cpindex Clean up +Wrapper for the @code{fclose} function. This wrapper +will retry if the call is interrupted by a signal. +It will however not return value, but you can detect +if an error have occured by inspecting @code{errno}, +it is guaranteed to be zero on success and otherwise +indicate the error that occurred. + @item @code{close_files} [(@code{condition}) @arrow{} @code{void}] @fnindex @code{close_files} @cpindex File descriptions, close all @@ -6431,6 +6451,16 @@ Parse a human readable @code{const char*} 10-radix integer to an @code{uintmax_t}. @end table +The header file @file{}, also +define the macro @code{TEMP_FAILURE_RETRY} if missing, +however without a return value but will clear @code{errno} +if no error occurs@footnote{@code{glibc} will not clear +@code{errno} on success, however this behaviour is defined +@code{MDS_LIBMDSSERVER_MACROS_DEFINED_TEMP_FAILURE_RETRY} +will be defined.}, and creates the alias +@code{CLOCK_MONOTONIC_RAW} for @code{CLOCK_MONOTONIC} +unless @code{CLOCK_MONOTONIC_RAW} is already defined. + @node Auxiliary Functions -- cgit v1.2.3-70-g09d2