Use plain kill to test signaled child

Recent update to Darwin18 make the test using kill -14
stop working.

Reviewed by: rillig
This commit is contained in:
sjg 2021-02-06 04:55:08 +00:00
parent 8e29352f70
commit a66bf246af
2 changed files with 7 additions and 10 deletions

View File

@ -1,7 +1,7 @@
make: "var-op-shell.mk" line 28: warning: "echo "failed"; false" returned non-zero status
make: "var-op-shell.mk" line 34: warning: "false" returned non-zero status
make: "var-op-shell.mk" line 59: warning: "kill -14 $$" exited on a signal
make: "var-op-shell.mk" line 56: warning: "kill $$" exited on a signal
/bin/no/such/command: not found
make: "var-op-shell.mk" line 65: warning: "/bin/no/such/command" returned non-zero status
make: "var-op-shell.mk" line 62: warning: "/bin/no/such/command" returned non-zero status
stderr
exit status 0

View File

@ -1,4 +1,4 @@
# $NetBSD: var-op-shell.mk,v 1.3 2020/11/09 20:39:46 rillig Exp $
# $NetBSD: var-op-shell.mk,v 1.4 2021/02/06 04:55:08 sjg Exp $
#
# Tests for the != variable assignment operator, which runs its right-hand
# side through the shell.
@ -50,13 +50,10 @@ OUTPUT!= echo "before"; false; echo "after"
. error
.endif
# NB: The signal number must be numeric since some shells (which ones?) don't
# accept symbolic signal names. 14 is typically SIGALRM.
#
# XXX: The number of the signal is not mentioned in the warning since that
# would have been difficult to implement; currently the errfmt is a format
# string containing a single %s conversion.
OUTPUT!= kill -14 $$$$
# This should result in a warning about "exited on a signal".
# This used to be kill -14 (SIGALRM), but that stopped working on
# Darwin18 after recent update.
OUTPUT!= kill $$$$
.if ${OUTPUT} != ""
. error
.endif