Merge branch 'musl-kill-decode' of https://github.com/ChenQi1989/util-linux - util-linux/util-linux.git (original) (raw)

author Karel Zak kzak@redhat.com 2025-06-16 13:37:50 +0200
committer Karel Zak kzak@redhat.com 2025-06-16 13:37:50 +0200
commit 9678fea3f5e89ea640fc3b98d655d91fbb8c4cd8 (patch)
tree 11a853a38ea786dcec46d5bdf531491ae364611f
parent 51c0697e5551fe3c2d481a4ac71d81695e5374ba (diff)
parent c5d5e8873029d170fcab38a6fbd5d5a355574b9f (diff)
download util-linux-master.tar.gz

Merge branch 'musl-kill-decode' of https://github.com/ChenQi1989/util-linux[HEAD](/pub/scm/utils/util-linux/util-linux.git/commit/?id=9678fea3f5e89ea640fc3b98d655d91fbb8c4cd8)[master](/pub/scm/utils/util-linux/util-linux.git/log/)

* 'musl-kill-decode' of https://github.com/ChenQi1989/util-linux: ts/kill/decode: use RTMIN from 'kill -L' instead of hardcoding 34

-rwxr-xr-x tests/ts/kill/decode 9

1 files changed, 7 insertions, 2 deletions

diff --git a/tests/ts/kill/decode b/tests/ts/kill/decode
index 57149899ef..524b4e5e26 100755
--- a/tests/ts/kill/decode
+++ b/tests/ts/kill/decode

@@ -53,14 +53,19 @@ ACK=

# Sending one more USR1 is for making the signal pending state.

"$TS_CMD_KILL" -USR1 "$PID"

"$TS_CMD_KILL" -d "$PID" | {

- if [[ ("("("TS_CMD_KILL" --list=34) == RT0 ]]; then

+ SIGRTMIN=$("$TS_CMD_KILL" -L | grep -o '[0-9]\+ RTMIN' | cut -d " " -f 1)

+ if [[ ("("("TS_CMD_KILL" --list=$SIGRTMIN) == RT0 ]]; then

# See man signal(7).

# The Linux kernel supports a range of 33 different real-time signals,

# numbered 32 to 64. However, the glibc POSIX threads implementation in‐

# ternally uses two (for NPTL) or three (for LinuxThreads) real-time sig‐

# nals (see pthreads(7)), and adjusts the value of SIGRTMIN suitably (to

# 34 or 35).

- sed -e s/' 32 33'// -e s/' 34'//

+ sed_cmd="sed"

+ for ((i=32; i<=SIGRTMIN; i++)); do

+ sed_cmd+=" -e s/' $i'//"

+ done

+ eval $sed_cmd

else

cat

fi