Homec4science

Test Conduit connection before daemonizing if --daemonize and --conduit-uri are…

Authored by epriestley <git@epriestley.com> on Jun 13 2011, 19:10.

Description

Test Conduit connection before daemonizing if --daemonize and --conduit-uri are both specified

Summary:
It's fairly common to have setup problems here but they currently occur in the
child and "phd launch xxxx" runs without error.

"phd debug" (D448) helps with this but we can be explicit about testing for this
even in the "phd launch" case.

(I don't reuse $this->conduit because I'm worried about how pcntl_fork() and
sockets may interact given some of my experiences in this area.)

Test Plan:
Took down Phabricator and ran "phd launch nice", got an error message instead of
a clean but doomed-to-failure daemon launch.

Reviewed By: jungejason
Reviewers: aran, jungejason, tuomaspelkonen
CC: aran, jungejason
Differential Revision: 449