about summary refs log tree commit diff
path: root/manual/signal.texi
diff options
context:
space:
mode:
Diffstat (limited to 'manual/signal.texi')
-rw-r--r--manual/signal.texi24
1 files changed, 24 insertions, 0 deletions
diff --git a/manual/signal.texi b/manual/signal.texi
index 1a4f866876..767ddabb41 100644
--- a/manual/signal.texi
+++ b/manual/signal.texi
@@ -1040,6 +1040,18 @@ a handler for @code{SIGKILL} or @code{SIGSTOP}.
 @end table
 @end deftypefun
 
+@strong{Compatibility Note:} A problem when working with the
+@code{signal} function is that it has a different semantic on BSD and
+SVID system.  The difference is that on SVID systems the signal handler
+is deinstalled after an signal was delivered.  On BSD systems the
+handler must be explicitly deinstalled.  In the GNU C Library we use the
+BSD version by default.  To use the SVID version you can either use the
+function @code{sysv_signal} (see below) or use the @code{_XOPEN_SOURCE}
+feature select macro (@pxref{Feature Test Macros})  Generally it should
+be avoided to use this functions due to the compatibility problems.  It
+is better to use @code{sigaction} if it is available since the results
+are much more reliable.
+
 Here is a simple example of setting up a handler to delete temporary
 files when certain fatal signals happen:
 
@@ -1080,6 +1092,18 @@ example because these are designed to provide information for debugging
 (a core dump), and the temporary files may give useful information.
 
 @comment signal.h
+@comment GNU
+@deftypefun sighandler_t sysv_signal (int @var{signum}, sighandler_t @var{action})
+The @code{sysv_signal} implements the behaviour of the standard
+@code{signal} function as found on SVID systems.  The difference to BSD
+systems is that the handler is deinstalled after a delivery of a signal.
+
+@strong{Compatibility Note:} As said above for @code{signal}, this
+function should be avoided when possible.  @code{sigaction} is the
+preferred method.
+@end deftypefun
+
+@comment signal.h
 @comment SVID
 @deftypefun sighandler_t ssignal (int @var{signum}, sighandler_t @var{action})
 The @code{ssignal} function does the same thing as @code{signal}; it is