From a62f00b8a3ed4b174a4633dafeda6584db7530fe Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Fri, 22 Aug 2014 17:12:40 -0700 Subject: [PATCH] Sort process tree by numeric PID, not by PID string --- src/minimart.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/minimart.js b/src/minimart.js index 187b081..5aaa6a1 100644 --- a/src/minimart.js +++ b/src/minimart.js @@ -348,7 +348,7 @@ World.prototype.processTree = function () { for (var pid in this.tombstones) { kids.push([pid, this.tombstones[pid]]); } - kids.sort(); + kids.sort(function (a, b) { return a[0] - b[0] }); return kids; };