Fix a segfault in start up when the environment can not be initialized.
This includes making sure that the client thread is not started if the server thread is not running.
Authored by: bnicholes 2006-11-16
Parent: [r399]
Child: [r401]