Ah, so I guess I was thinking less about einhornsh itself, and more about 3rd party clients that might want to connect to Einhorn. You can imagine implementing a lot of plugin functionality that way (e.g. "listen for spawn notifications and increment a statd counter"). I don't think you need a full `select()`-driven event loop (if you did, I'd recommend trying to reuse the existing Einhorn code for that). Instead, you should be able to get by with just reading and writing to the single socket, right?

In any case, I'd be +1 on on the two-mode solution for einhornsh — it feels similar to how multiplexing works in your shell (run a command in the foreground, ctrl-z it, and then run something else).