mirror of
https://github.com/mirror/make.git
synced 2026-09-05 22:25:00 +08:00
* function.c (shell_completed): [SV 51014] Add signal to .SHELLSTATUS
* tests/scripts/functions/shell: Verify that .SHELLSTATUS contains a non-0 value when the shell exits due to a signal.
This commit is contained in:
@@ -22,9 +22,16 @@ $(shell exit 0)
|
||||
OK := $(.SHELLSTATUS)
|
||||
$(shell exit 1)
|
||||
BAD := $(.SHELLSTATUS)
|
||||
$(shell kill -2 $$$$)
|
||||
SIG := $(.SHELLSTATUS)
|
||||
all: ; @echo PRE=$(PRE) OK=$(OK) BAD=$(BAD)
|
||||
','','PRE= OK=0 BAD=1');
|
||||
|
||||
run_make_test('.PHONY: all
|
||||
$(shell kill -2 $$$$)
|
||||
SIG := $(.SHELLSTATUS)
|
||||
all: ; @echo SIG=$(SIG)
|
||||
','','SIG=130');
|
||||
|
||||
# Test unescaped comment characters in shells. Savannah bug #20513
|
||||
run_make_test(q!
|
||||
|
||||
Reference in New Issue
Block a user