There are many error situations which result in StartupRetroshare() calling exit(1). This makes providing a robust login/profile setup facilitity complex as I all the error conditions must be checked ahead of time to reduce the possibility for unrecoverable errors and the demon exiting. Alternately I have to run a sort of fork()'d process monitor thing (with all the IPC overhead that entails) and interpret the stderr messages in a way that is useful for the end user.
A quick grep of the source suggests that exit(1) might be quite a common error path :(