sem_unlink \
sem_wait \
sigaction \
+ libc_sigaction \
tpp \
unwind \
unwind-forcedunwind \
bits/sigstksz.h
routines := signal raise killpg \
- sigaction sigprocmask kill \
+ sigaction libc_sigaction sigprocmask kill \
sigpending sigsuspend sigwait \
sigblock sigsetmask sigpause sigvec \
sigstack sigaltstack sigintr \
--- /dev/null
+/* Internal sigaction definitions.
+ Copyright (C) 2021 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
+ 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, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <signal.h>
+
+/* If ACT is not NULL, change the action for SIG to *ACT.
+ If OACT is not NULL, put the old action for SIG in *OACT. */
+int
+__libc_sigaction (int sig, const struct sigaction *act,
+ struct sigaction *oact)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (libc_sigaction)
+libc_hidden_def (__libc_sigaction)
#include <errno.h>
#include <signal.h>
-
+#include <internal-signals.h>
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
return -1;
}
- __set_errno (ENOSYS);
- return -1;
+ return __libc_sigaction (sig, act, oact);
}
libc_hidden_def (__sigaction)
-stub_warning (sigaction)
-
weak_alias (__sigaction, sigaction)
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
int
-__sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
+__libc_sigaction (int sig, const struct sigaction *act,
+ struct sigaction *oact)
{
struct hurd_sigstate *ss;
struct sigaction a, old;
sigset_t pending;
- if (sig <= 0 || sig >= NSIG
- || (act != NULL && act->sa_handler != SIG_DFL
- && ((__sigmask (sig) & _SIG_CANT_MASK)
- || act->sa_handler == SIG_ERR)))
+ if (act != NULL && act->sa_handler != SIG_DFL
+ && ((__sigmask (sig) & _SIG_CANT_MASK) || act->sa_handler == SIG_ERR))
{
errno = EINVAL;
return -1;
return 0;
}
-libc_hidden_def (__sigaction)
-weak_alias (__sigaction, sigaction)
+libc_hidden_def (__libc_sigaction)
setsockopt - setsockopt i:iiibn setsockopt __setsockopt
setuid - setuid i:i __setuid setuid
shutdown - shutdown i:ii shutdown
-sigaction - sigaction i:ipp __sigaction sigaction
sigsuspend - sigsuspend Ci:p sigsuspend
socket - socket i:iii __socket socket
socketpair - socketpair i:iiif socketpair
#define RESET_SA_RESTORER(act, kact) \
(act)->sa_restorer = (kact)->sa_restorer;
-#include <sysdeps/unix/sysv/linux/sigaction.c>
+#include <sysdeps/unix/sysv/linux/libc_sigaction.c>
#define RESET_SA_RESTORER(act, kact)
-#include <sysdeps/unix/sysv/linux/sigaction.c>
+#include <sysdeps/unix/sysv/linux/libc_sigaction.c>
#define RESET_SA_RESTORER(act, kact) \
(act)->sa_restorer = (kact)->sa_restorer;
-#include <sysdeps/unix/sysv/linux/sigaction.c>
+#include <sysdeps/unix/sysv/linux/libc_sigaction.c>
#define RESET_SA_RESTORER(act, kact) \
(act)->sa_restorer = (kact)->sa_restorer
-#include <sysdeps/unix/sysv/linux/sigaction.c>
+#include <sysdeps/unix/sysv/linux/libc_sigaction.c>
/* NOTE: Please think twice before making any changes to the bits of
code below. GDB needs some intimate knowledge about it to
return result;
}
libc_hidden_def (__libc_sigaction)
-
-#include <nptl/sigaction.c>
: 0, \
(sigsetsize)
-#include <sysdeps/unix/sysv/linux/sigaction.c>
+#include <sysdeps/unix/sysv/linux/libc_sigaction.c>
(((unsigned long) &__rt_sigreturn_stub) - 8), \
(sigsetsize)
-#include <sysdeps/unix/sysv/linux/sigaction.c>
+#include <sysdeps/unix/sysv/linux/libc_sigaction.c>
#include <kernel_sigaction.h>
-#include <sysdeps/unix/sysv/linux/sigaction.c>
+#include <sysdeps/unix/sysv/linux/libc_sigaction.c>
/* NOTE: Please think twice before making any changes to the bits of
code below. GDB needs some intimate knowledge about it to