Way back in October, Timothy Brownawell wrote:
J Decker wrote:
When I abort an operation in monotone for windows, an exception is
generated.  I have tolerated this since version 0.26... but... no I'm
tried of having to wait for the exception handler to log the
exception... y'all should implement

SetConsoleCtrlHandler

and handle exiting nicely instead of blowing up.  PLEASE!

Patches welcome?

I've tried this before, but IIRC calling ExitProcess() from the handler
would still segfault (I also think I recall trying TerminateProcess()
with the same result, but that doesn't seem to make sense).

Without a ctrl handler (how things are now), ^C causes a segfault.

With a ctrl handler that returns FALSE (makes it call the default handler), it segfaults.

With a ctrl handler that calls ExitProcess(), it segfaults.

With a ctrl handler that returns TRUE (don't call the next handler), it *exits*.

With a ctrl handler that calls TerminateProcess(), it exits.

If I run from cmd.exe instead of the msys shell...
        returning FALSE segfaults
        returning TRUE does nothing (like it should)



So... maybe we should have a ctrl handler that returns FALSE after setting a flag to make the segfault handler print a less dire message? I'm not sure how to make sense of what it's doing.


_______________________________________________
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to