diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-08-23 03:30:46 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-08-23 03:30:46 +0200 |
commit | 3d652087604ca1c6a66d9fa319645aeec1cf1b7b (patch) | |
tree | 0c54c322b6f053bdb4e898b6683c8190922f3539 /doc/info | |
parent | m + colour on selected items in lists and tables (diff) | |
download | mds-3d652087604ca1c6a66d9fa319645aeec1cf1b7b.tar.gz mds-3d652087604ca1c6a66d9fa319645aeec1cf1b7b.tar.bz2 mds-3d652087604ca1c6a66d9fa319645aeec1cf1b7b.tar.xz |
signal handlers that return should not modify errno
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'doc/info')
-rw-r--r-- | doc/info/mds.texinfo | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/info/mds.texinfo b/doc/info/mds.texinfo index 03b2a1a..b2f1192 100644 --- a/doc/info/mds.texinfo +++ b/doc/info/mds.texinfo @@ -6460,6 +6460,28 @@ if no error occurs@footnote{@code{glibc} will not clear will be defined.}, and creates the alias @code{CLOCK_MONOTONIC_RAW} for @code{CLOCK_MONOTONIC} unless @code{CLOCK_MONOTONIC_RAW} is already defined. +The header file also ensure that all aliases for socket +protocol families and address families, for all definied +protocol families and address families. + +The header file @file{<libmdsserver/macros.h>}, also +provides to macros to help write signal handlers. +@table @code +@item SIGHANDLER_START +Normal signal handlers should place this macro +at the top of the function. It will save the value +of @code{errno}. +@item SIGHANDLER_END +Normal signal handlers should place this macro +at the bottom of the function, or just before +any @code{return}. It will restore the value of +@code{errno} saved by @code{SIGHANDLER_START}. +@end table +These macros should be used, because signal handlers +should not modify @code{errno}. The one occasion where +exiting a signal handler with a modified @code{errno} +is acceptable, is when the signal handler exits the +program without returning. |