Merge "pid: switch to pgrep." am: 3aa9457410 am: 3140c7e495

am: e7e7d31b2b

Change-Id: Ib26e3cf8be337d5df6205ea3323348af67ee8480
This commit is contained in:
Josh Gao
2018-07-23 19:09:16 -07:00
committed by android-build-merger

View File

@@ -28,12 +28,10 @@ fi
if [ $EXACT == 1 ]; then
PIDS="$(adb shell pidof $EXE)"
RC=$?
else
PIDS=$(adb shell "ps -o PID,NAME | tail -n +1 | grep $EXE | tr -s ' ' | cut -f2 -d' '")
[ -n "$PIDS" ]
RC=$?
PIDS="$(adb shell pgrep -f $EXE)"
fi
RC=$?
for PID in $PIDS; do
echo $PID