mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix 'kill -INFO' on systems that support SIGINFO (#59)
src/cmd/ksh93/data/signals.c: - SIGINFO was absent from the table of signals, which caused commands like 'kill -INFO $$' to fail even on platforms with SIGINFO (such as macOS and FreeBSD). Fix that by adding it to the signal table. src/cmd/ksh93/tests/signal.sh: - Add a regression tests for using SIGINFO with the kill builtin. The test will only be run if the external kill command supports SIGINFO.
This commit is contained in:
parent
d7afb57c49
commit
658bba748e
3 changed files with 13 additions and 0 deletions
|
@ -459,5 +459,12 @@ $SHELL -c 'kill %% 2> /dev/null'; [[ $? == 1 ]] || err_exit $'`kill` doesn\'t ha
|
|||
$SHELL -c 'kill %+ 2> /dev/null'; [[ $? == 1 ]] || err_exit $'`kill` doesn\'t handle a non-existent job correctly when passed \'%+\''
|
||||
$SHELL -c 'kill %- 2> /dev/null'; [[ $? == 1 ]] || err_exit $'`kill` doesn\'t handle a non-existent job correctly when passed \'%-\''
|
||||
|
||||
# ======
|
||||
# SIGINFO should be supported by the kill builtin on platforms that have it.
|
||||
if "$(whence -p kill)" -INFO $$ 2> /dev/null
|
||||
then
|
||||
kill -INFO $$ || err_exit '`kill` cannot send SIGINFO to processes when passed `-INFO`'
|
||||
fi
|
||||
|
||||
# ======
|
||||
exit $((Errors<125?Errors:125))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue