diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-08-21 20:43:01 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-08-21 20:43:01 +0200 |
commit | 16b25c8a426c285c85c24db115c677218d287da9 (patch) | |
tree | 7712ef9bc069da7836bcf492edc5ca915d8ceb5e /doc/info/mds.texinfo | |
parent | m info (diff) | |
download | mds-16b25c8a426c285c85c24db115c677218d287da9.tar.gz mds-16b25c8a426c285c85c24db115c677218d287da9.tar.bz2 mds-16b25c8a426c285c85c24db115c677218d287da9.tar.xz |
add and use xclose and xfclose, we do not want close or fclose to be ignored because a singal interrupts it.
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'doc/info/mds.texinfo')
-rw-r--r-- | doc/info/mds.texinfo | 30 |
1 files changed, 30 insertions, 0 deletions
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{<libmdsserver/macros.h>}, 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 |