Update on HZ10: I finally got it building, and the binaries are each a little over 200 bytes larger (probably due to the fact that some extra work is performed to break the child processing into a separate function, and because the child processing no longer gets to inherit main()'s variables for free). That's not bad at all. The source is now split up as follows: pixelserv.c contains the main() function, minus almost all of the stuff that happens inside the fork()'d child processes. socket_handler.c contains a socket_handler() function that implements almost all of the logic (everything but closing a couple of file handles) that used to be inside the ford()'d child process. It also contains the static response strings as variables that are global to that file. socket_handler.h contains the public interface to socket_handler(). util.c contains the volatile sig_atomic_t stats variables and almost all of the functions other than main() and socket_handler() - most notably signal_handler(), get_version(), get_stats(), etc. I may move all functions that are only used by socket_handler() to socket_handler.c so that they move out of scope of main(). util.h contains all of the #define's, system header #include's, response enum, public (extern) interface to the volatile sig_atomic_t stats variables, public interfaces to util.c functions, and changelog comments. The only part that still feels a bit yucky is that everything that can be configured via the command line has to be passed on to socket_handler(). There's really no way around this, though. I've thought about encapsulating it all in a struct so that I can just pass that around and so that I could also move command line processing out of main(), but that's probably overkill at this point. Still, I feel a lot better about the integrity of the code with it being split up a bit. This will make it harder for bugs to creep in as new features are added. Tomorrow I will do a final cleanup pass (probably just moving some stuff from util.c to socket_handler.c) and then start looking into non-blocking pipe I/O.