Commit Graph

3 Commits

Author SHA1 Message Date
Josh Gao
f080bf1f76 pid: switch to pgrep.
Fix a bug where processes that didn't have a leading space from right
justification of the pid column would return the process name instead
of the pid, by switching to pgrep.

Bug: http://b/111748205
Test: manual
Change-Id: I3493474540ccfa89f5bb3e66153d9e96ec8bf1d9
2018-07-23 17:01:42 -07:00
Josh Gao
4df6279c71 Add return code support to pid.
Test: pid nonexistent; echo $?
Test: pid --exact nonexistent; echo $?
Change-Id: If8efb1ca27ae3ed7b5be1c51179fae387c56e305
2018-06-14 16:36:12 -07:00
Josh Gao
3dffb8438d Move pid, stacks from envsetup.sh to dedicated scripts.
Make it so that these can be used in other scripts by moving them from
functions defined in envsetup.sh to standalone scripts.

Test: stacks zygote64
Change-Id: I55ba76b248c54d9193fb019b7f4aca2f4c3a05bd
2018-06-14 16:36:12 -07:00