]> git.evergreen-ils.org Git - OpenSRF.git/commit
This update mainly tightens the error handling.
authorscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 29 Jan 2009 03:58:26 +0000 (03:58 +0000)
committerscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 29 Jan 2009 03:58:26 +0000 (03:58 +0000)
commit3881faf26a875fc5d3d0570237a3f18896e8c71f
tree582e1c19846093a933945eeb991b2a5bc9e8ac2d
parentc0c189f44fceba6146e1c8c4bdb4240bffa34fbb
This update mainly tightens the error handling.

1. If there aren't enough arguments on the command line, return EXIT_FAILURE
instead of zero.

2. Defer the call to set_proc_title() until we are done using the command
line arguments, so that we don't have to make copies of them.

3. Check the return value from osrfConfigInit().  Otherwise a NULL (caused,
e.g., by a missing config file) leads to a segfault.

4. If the config file doesn't define any routers to spawn, exit immediately
with an error message before entering the fork loop.

5. If a child process returns (due to an error) instead of entering the
normal endless loop, break out of the fork loop.  Otherwise the child
remains in the fork loop and spawns children of its own (unless it's the
last child to be spawned).  At best, that's just silly.

6. Append an newline to a message issued from setupRouter().  (It's not
clear why this message goes directly to stderr instead of to the usual
logging machinery, which at this point is directed to stderr anyway.)

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1647 9efc2488-bf62-4759-914b-345cdb29e865
src/router/osrf_router_main.c