<span style="font-family: courier new,monospace;">I am writing a simple calculator that uses GMP.</span><br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">I would like it to be human-friendly and especially allow a keyboard <br>
interrupt to quit a calculation and return to the prompt. However, if a <br>GMP function is executing at the moment I would want to force it to stop <br>and quit cleanly when the program gets a SIGINT.<br><br>Is there some best way to do this, or should I not bother? (I notice <br>
the cpython interpreter, for one, just hangs on bignum calculations <br>despite otherwise handling ^C.) I would really not prefer to <br>separate the GMP calling code out into a process of its own or anything <br>complicated like that just to get a small nifty feature.<br>
<br>Thanks,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Jafet</span><br style="font-family: courier new,monospace;">