-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor parent pid check; drop --keepalive
This commit moves parent pid process from the webapp package to the boot script. This means that daemonized apps without webapp will also exit when the runner exits, if run from the runner. (For example, several self-tests such as 'autoupdate' no longer leak node processes.) This is controlled via the $METEOR_PARENT_PID environment variable instead of from command line arguments, in order to make fewer assumptions about how Meteor apps process arguments. This also drops the old --keepalive support (which already has stopped being used by the dev mode runner or any MDG deployment platforms). Neither --parent-pid nor --keepalive were documented beforehand, and --keepalive was already deprecated before 1.0. These flags used to also incidentally trigger printing the LISTENING line; this is now controlled by $METEOR_PRINT_ON_LISTEN. Fixes #3315.
- Loading branch information
Showing
9 changed files
with
84 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Separated from boot.js for testing. | ||
|
||
// Check that we have a pid that looks like an integer (non-decimal | ||
// integer is okay). | ||
exports.validPid = function (pid) { | ||
return ! isNaN(+pid); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
var selftest = require('../selftest.js'); | ||
|
||
selftest.define("boot utils", function (options) { | ||
var bootUtils = require('../server/boot-utils.js'); | ||
selftest.expectTrue(bootUtils.validPid(123)); | ||
selftest.expectTrue(bootUtils.validPid("123")); | ||
selftest.expectTrue(bootUtils.validPid(0x123)); | ||
selftest.expectTrue(bootUtils.validPid("0x123")); | ||
|
||
selftest.expectFalse(bootUtils.validPid("foo123")); | ||
selftest.expectFalse(bootUtils.validPid("foobar")); | ||
selftest.expectFalse(bootUtils.validPid("123foo")); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters