aboutsummaryrefslogtreecommitdiff
path: root/nptl/sigaction.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-12-29 16:34:57 +0000
committerUlrich Drepper <drepper@redhat.com>2005-12-29 16:34:57 +0000
commit8b4f1598232f1572d778e0e558aaad273c38356b (patch)
tree94a72dbc5c9429d0148833da08dc380780d67fe0 /nptl/sigaction.c
parent02f15bca29eff0a845db00d539928a749ea6ee50 (diff)
downloadglibc-8b4f1598232f1572d778e0e558aaad273c38356b.zip
glibc-8b4f1598232f1572d778e0e558aaad273c38356b.tar.gz
glibc-8b4f1598232f1572d778e0e558aaad273c38356b.tar.bz2
* sysdeps/unix/sysv/linux/sigaction.c: If WRAPPER_INCLUDE is defined,
include the named file. * sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.
Diffstat (limited to 'nptl/sigaction.c')
-rw-r--r--nptl/sigaction.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/nptl/sigaction.c b/nptl/sigaction.c
new file mode 100644
index 0000000..60e1f1d
--- /dev/null
+++ b/nptl/sigaction.c
@@ -0,0 +1,47 @@
+/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+/* This is no complete implementation. The file is meant to be
+ included in the real implementation to provide the wrapper around
+ __libc_sigaction. */
+
+#include <nptl/pthreadP.h>
+
+/* We use the libc implementation but we tell it to not allow
+ SIGCANCEL or SIGTIMER to be handled. */
+#define LIBC_SIGACTION 1
+
+
+int
+__sigaction (sig, act, oact)
+ int sig;
+ const struct sigaction *act;
+ struct sigaction *oact;
+{
+ if (__builtin_expect (sig == SIGCANCEL || sig == SIGSETXID, 0))
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ return __libc_sigaction (sig, act, oact);
+}
+libc_hidden_weak (__sigaction)
+weak_alias (__sigaction, sigaction)