* --port now requires a port ('meteor run --port example.com' isn't valid).
* --mobile-server defaults to your detected IP address and the port from
--port.
* If you provide a value for --mobile-server, we default to http:// as
the protocol. A host is required for --mobile-server if you don't omit
the option entirely. Similar for the --server argument to 'meteor
build'.
This commit includes the 'netroute' npm module as a core package (which
has binary dependencies) for IP detection. It would be nice to put it in
packages/non-core, but I think it has to be a core package in order to
uniload it.
If you pass "--parent-pid foobar", then we immediately log an error
message and exit. This check happens via `parseInt` rather than testing
for exceptions in `process.kill(parentPid, 0)` because `process.kill`
converts its pid argument to an integer, so `process.kill('foobar', 0)`
returns true just as `process.kill(0, 0)` does.
Before this, if the runner decided to stop (eg, because mongod is
crashing too much) while waiting for file change, it would crash due to
an attempt to wait within a fiber. Fixing that bug by adding an inFiber
would then lead to the process just not exiting, because nothing stops
the wait-specific future.
- Exit with failure if proxy starts to listen. Previously, we got stuck
inside ProxyRunner.start(), and since we weren't waiting on any IO
we'd exit 0! (The existence of a yielded fiber is not sufficient to
block Node exit.)
- Don't print various bits of startup text if we are stopped midway.
- Stop main Runner immediately if proxy or mongo runners invoke
onFailure, rather than waiting for wait to be called and return.
- Ensure that a few Futures don't get return called on them multiple
times.
- Ensure we don't try to call close() on the proxy's TCP server if it
failed to listen in the first place.