On 3/29/21 7:30 PM, Scott Andrews wrote:
The existing function does not return a correct result for all signal types.
# check_sig_type() #
Original less empty lines check_sig_type() { local valsig # The list of termination signals (limited to generally used items)valsig="-ALRM -INT -KILL -TERM -PWR -STOP -ABRT -QUIT -2 -3 -6 -9 -14 -15"echo "${valsig}" | grep -- " ${1} " > /dev/null if [ "${?}" -eq "0" ]; then return 0 else return 1 fi }
You are right, there is an error. The grep is for " ${1} " and there is no leading space for -ALRM and no trailing space for -15. A simple fix.
That said, I checked the usage. The function is only used by killproc in init-functions. Checking further, the scripts that call killproc only refer to -HUP, -QUIT, -USR1, and -USR2.
That said, it should be fixed, but is low priority and should be deferred until the next change is necessary.
-- Bruce -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
