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

am: 3140c7e495

Change-Id: Iaabe83d3fa5976d6b0bef1b070d571b4bf268fb6
This commit is contained in:
Josh Gao
2018-07-23 19:04:10 -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