debugger.mk: Get pid from pidof(8) instead of ps(1)

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2017-04-20 13:28:10 +00:00
commit 70454e8c88

View file

@ -13,7 +13,7 @@ ifeq ($(CORE_DUMPER),)
CORE_DUMPER = $(EXE_PATH)
endif
PID = $(shell ps aux | $(SED) "/$(notdir $(EXE_PATH))\( \|$$\)/ !d; /sed/ d; /defunct/ d" | awk '{print $$2}')
PID = $(shell pidof $(EXE_PATH))
all:
@ -74,4 +74,5 @@ coreclean: centralcore-clean
centralcore-clean:
rm -f /var/cores/core* /var/cores/vgcore* || exit 0
echo-pid:
@echo PID = $(PID)