|
From: | Zack Weinberg |
Subject: | Re: [Monotone-devel] nvm.interrupts: beginnings of more robust signal handling |
Date: | Sun, 23 Jul 2006 16:49:48 -0700 |
On 7/22/06, Zack Weinberg <address@hidden> wrote:
> Hmm, I kind of like how the current design keeps all the crazy > signal/exception/etc. handling (that never changes) out in one file, > and then all the actual monotone-related logic is in a different file. Understood, but I think duplicating it all between unix/main.cc and win32/main.cc is worse, and I think the problem you're seeing is better addressed with some more judicious refactoring of cpp_main, which was a mess before these changes and is still a mess today.
I have now done just that (still on nvm.interrupts). The option parsing loop got its own function, the chain of catch clauses is now much shorter and calls into ui to do the grunt work, and all the stuff that we MM() at the very beginning is now MM()ed in sanity.cc. This last I'm not 100% sure is a good move, but it's in a separate commit from everything else so it will be easy to get rid of if we decide we don't want it. The upshot is, cpp_main() now fits on one screen, yay. zw
[Prev in Thread] | Current Thread | [Next in Thread] |