|Subject:||.SHELLSTATUS not set correctly when $(shell ...) terminated by signal|
|Date:||Tue, 21 Mar 2017 13:59:49 +0000|
It looks like the value of .SHELLSTATUS is not always set correctly when the $(shell …) command is terminated by a signal.
Here’s a Makefile which demonstrates this behavior:
STDOUT := $(shell kill -s SEGV $$$$)
$(info status=$(.SHELLSTATUS) stdout="$(STDOUT)")
I ran this Makefile on Debian 8 Linux using gmake 4.2.1 and got the following output:
status=0 stdout=" "
Makefile:3: *** Stop. Stop.
I would have expected behavior similar to what happens when a recipe is interrupted by a signal, where gmake receives a non-zero exit value from the recipe.
Is this the expected behavior of .SHELLSTATUS in this use case?
|[Prev in Thread]||Current Thread||[Next in Thread]|