From c592ec91adfa10cc87720e426cc17ca890deacd1 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Thu, 25 Sep 2014 15:33:32 -0700 Subject: [PATCH] Add comment about pid reuse to `startCheckForLiveParent` --- packages/webapp/webapp_server.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/webapp/webapp_server.js b/packages/webapp/webapp_server.js index 80582710c2..c00b7267b3 100644 --- a/packages/webapp/webapp_server.js +++ b/packages/webapp/webapp_server.js @@ -60,6 +60,13 @@ var initKeepalive = function () { // As a replacement to the old keepalives mechanism, check for a running // parent every few seconds. Exit if the parent is not running. +// +// Two caveats to this strategy: +// * Doesn't catch the case where the parent is CPU-hogging (but maybe we +// don't want to catch that case anyway, since the bundler not yielding +// is what caused #2536). +// * Could be fooled by pid re-use, i.e. if another process comes up and +// takes the parent process's place before the child process dies. var startCheckForLiveParent = function (parentPid) { if (parentPid) { setInterval(function () {