blob: 73fff053d48a8cd0081e0276c4bccc4016982804 (
plain) (
tree)
|
|
# unfortunately we are using gawk features
type gawk >/dev/null 2>&1 || ts_skip "cannot find gawk"
# The test_sigreceive is ready when signal process mask contains SIGHUP
function check_test_sigreceive {
local rc=0
local pid=$1
for i in 0.01 0.1 1 1 1 1; do
gawk 'BEGIN { retval=1 }
/^SigCgt/ {
lbyte = strtonum("0x" substr($2, 16, 16))
if (and(lbyte, 1)) {
retval=0
}
} END {
exit retval
}' /proc/$pid/status &&
rc=1 &&
break
sleep $i
done
return $rc
}
|