summaryrefslogtreecommitdiff
path: root/libgo/mksigtab.sh
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/mksigtab.sh')
-rw-r--r--libgo/mksigtab.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/libgo/mksigtab.sh b/libgo/mksigtab.sh
index 11e4ec436bd..bea8739957e 100644
--- a/libgo/mksigtab.sh
+++ b/libgo/mksigtab.sh
@@ -26,7 +26,6 @@ SIGLIST=""
# Handle signals valid on all Unix systems.
addsig() {
- echo " $1: $2,"
# Get the signal number and add it to SIGLIST
signum=`grep "const $1 = " gen-sysinfo.go | sed -e 's/.* = //'`
if echo "$signum" | grep '^_SIG[A-Z0-9_]*$' >/dev/null 2>&1; then
@@ -34,7 +33,12 @@ addsig() {
# This is needed for some MIPS signals defined as aliases of other signals
signum=`grep "const $signum = " gen-sysinfo.go | sed -e 's/.* = //'`
fi
- SIGLIST=$SIGLIST"_${signum}_"
+ # Only add signal if the signal number isn't in the list yet.
+ # For example, musl libc uses signal 29 for both SIGIO and SIGPOLL.
+ if ! echo "$SIGLIST" | grep "_${signum}_" >/dev/null 2>&1; then
+ echo " $1: $2,"
+ SIGLIST=$SIGLIST"_${signum}_"
+ fi
}
echo ' 0: {0, "SIGNONE: no trap"},'
@@ -95,10 +99,12 @@ checksig _SIGLOST ' {_SigNotify, "SIGLOST: resource lost (Sun); server died (G
# Special handling of signals 32 and 33 on GNU/Linux systems,
# because they are special to glibc.
+# Signal 34 is additionally special to Linux systems with musl.
if test "${GOOS}" = "linux"; then
- SIGLIST=$SIGLIST"_32__33_"
+ SIGLIST=$SIGLIST"_32__33__34_"
echo ' 32: {_SigSetStack + _SigUnblock, "signal 32"}, /* SIGCANCEL; see issue 6997 */'
echo ' 33: {_SigSetStack + _SigUnblock, "signal 33"}, /* SIGSETXID; see issues 3871, 9400, 12498 */'
+ echo ' 34: {_SigSetStack + _SigUnblock, "signal 34"}, /* musl SIGSYNCCALL; see issue 39343 */'
fi
if test "${GOOS}" = "aix"; then