From a5471a6723f4069f9c6e8d482d5a9045e58b695e Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 3 Oct 2016 13:38:27 -0700 Subject: [PATCH] exec makeparallel bash doesn't kill children when it receives SIGTERM. Since makeparallel is the last command run by the shell, run it with exec to replace the shell with makeparallel so make can send the signal directly to makeparallel. Bug: 31907490 Test: m -j & killall make; pgrep -a makeparallel Change-Id: If8aeb51ec224234da5f05eae3382ce77f48a57e2 --- core/ninja.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/ninja.mk b/core/ninja.mk index fd368097c4..3779df34a3 100644 --- a/core/ninja.mk +++ b/core/ninja.mk @@ -148,7 +148,7 @@ $(sort $(DEFAULT_GOAL) $(ANDROID_GOALS)) : ninja_wrapper .PHONY: ninja_wrapper ninja_wrapper: $(COMBINED_BUILD_NINJA) $(MAKEPARALLEL) @echo Starting build with ninja - +$(hide) export NINJA_STATUS="$(NINJA_STATUS)" && source $(KATI_ENV_SH) && $(NINJA_MAKEPARALLEL) $(NINJA) -d keepdepfile $(NINJA_GOALS) -C $(TOP) -f $(COMBINED_BUILD_NINJA) $(NINJA_ARGS) + +$(hide) export NINJA_STATUS="$(NINJA_STATUS)" && source $(KATI_ENV_SH) && exec $(NINJA_MAKEPARALLEL) $(NINJA) -d keepdepfile $(NINJA_GOALS) -C $(TOP) -f $(COMBINED_BUILD_NINJA) $(NINJA_ARGS) # Dummy Android.mk and CleanSpec.mk files so that kati won't recurse into the # out directory