summaryrefslogtreecommitdiff
path: root/bits
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-07-23 07:20:28 +0000
committerRoland McGrath <roland@gnu.org>2001-07-23 07:20:28 +0000
commit393aec52440dc47aab9971616b0d7521b8a4f431 (patch)
tree35da27d41091c9ec8cd2ca78f1a19f9ece297769 /bits
parent5d83494fadbcd3730eb1e6e1ff19ddefad4072ce (diff)
* hurd/hurdsig.c (_hurd_internal_post_signal): Support SA_RESETHAND
and SA_NODEFER options. Spurred to action by Igor Khavkine. * sysdeps/generic/bits/sigaction.h [__USE_UNIX98 || __USE_MISC] (SA_NODEFER, SA_RESETHAND): New macros, same bit values as FreeBSD. [__USE_MISC] (SA_INTERRUPT): New macro, value 0. [__USE_MISC] (SA_NOMASK, SA_ONESHOT, SA_STACK): New macros, aliases as in other sysdeps versions of this file. * sysdeps/generic/bits/sigaction.h (struct sigaction): Use a union and provide sa_handler and sa_sigaction member names as macros, as done in other sysdeps versions of this file. Suggested by Igor Khavkine <i_khavki@alcor.concordia.ca>.
Diffstat (limited to 'bits')
-rw-r--r--bits/sigaction.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/bits/sigaction.h b/bits/sigaction.h
index 67981e8a2b..e23a96cd9d 100644
--- a/bits/sigaction.h
+++ b/bits/sigaction.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,96,97,98,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,7 +30,12 @@
struct sigaction
{
/* Signal handler. */
- __sighandler_t sa_handler;
+ union {
+ __sighandler_t sa_handler;
+ void (*sa_sigaction) (int, siginfo_t *, void *);
+ } __sigaction_handler;
+# define sa_handler __sigaction_handler.sa_handler
+# define sa_sigaction __sigaction_handler.sa_sigaction
/* Additional set of signals to be blocked. */
__sigset_t sa_mask;
@@ -43,9 +48,21 @@ struct sigaction
#if defined __USE_UNIX98 || defined __USE_MISC
# define SA_ONSTACK 0x0001 /* Take signal on signal stack. */
# define SA_RESTART 0x0002 /* Restart syscall on signal return. */
+# define SA_NODEFER 0x0010 /* Don't automatically block the signal when
+ its handler is being executed. */
+# define SA_RESETHAND 0x0004 /* Reset to SIG_DFL on entry to handler. */
#endif
#define SA_NOCLDSTOP 0x0008 /* Don't send SIGCHLD when children stop. */
+#ifdef __USE_MISC
+# define SA_INTERRUPT 0 /* Historical no-op ("not SA_RESTART"). */
+
+/* Some aliases for the SA_ constants. */
+# define SA_NOMASK SA_NODEFER
+# define SA_ONESHOT SA_RESETHAND
+# define SA_STACK SA_ONSTACK
+#endif
+
/* Values for the HOW argument to `sigprocmask'. */
#define SIG_BLOCK 1 /* Block signals. */