Merge pull request #3044 from tonetheman/chromedriverKill

ps in kill chromedriver added -f switch and moved awk to  since pid will...
This commit is contained in:
Jonathan Lipps
2014-07-02 13:02:38 -07:00
+2 -2
View File
@@ -58,8 +58,8 @@ Chromedriver.prototype.killOldChromedrivers = function (cb) {
")" +
")";
} else {
cmd = "ps -e | grep " + this.chromedriver + " | grep -v grep |" +
"grep -e '--port=" + this.proxyPort + "$' | awk '{ print $1 }' | " +
cmd = "ps -ef | grep " + this.chromedriver + " | grep -v grep |" +
"grep -e '--port=" + this.proxyPort + "$' | awk '{ print $2 }' | " +
"xargs kill -15";
}
logger.debug("Killing any old chromedrivers, running: " + cmd);