From 21b3732d10d1e9b5c8c8a00f3ea0e2a37c8f2216 Mon Sep 17 00:00:00 2001 From: kyung yeol kim Date: Wed, 4 Dec 2013 12:34:08 +0900 Subject: [PATCH] Support for parsing android 4.4 process list result. --- src/scripts/parser.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/scripts/parser.js b/src/scripts/parser.js index c6d7803..ef22664 100644 --- a/src/scripts/parser.js +++ b/src/scripts/parser.js @@ -93,7 +93,10 @@ function makeCommand(cmd) { * @returns {Array} */ function parseProcessList(data) { - var re = new RegExp(/^(\w+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+([a-fA-F0-9]+)\s+([a-fA-F0-9]+ \w)\s+(.+)/m); + // parse oldstyle ps result + var ore = new RegExp(/^(\w+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+([a-fA-F0-9]+)\s+([a-fA-F0-9]+ \w)\s+(.+)/m); + // parse 4.4 or above ps result + var nre = new RegExp(/^(\d+)\s+(\d+)\s+(\d+m?)\s+(\w+\s*