View Single Post
Old 2021-06-08, 11:56   #4
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

2×13×47 Posts
Default

Maybe you could use the return value of ecm if it is killed by ^C?

Code:
~$ ecm 1e9
GMP-ECM 7.0.4 [configured with GMP 6.2.0, --enable-asm-redc] [ECM]
2^1277-1
Input number is 2^1277-1 (385 digits)
Using B1=1000000000, B2=19071176724616, polynomial Dickson(30), sigma=0:8818687562867645865
^C
~$ echo $?
130
If the return value of ecm is 130, interrupt. Or print a message and wait at least a second or two for the user to hit ^C again. Just an idea.
kruoli is online now   Reply With Quote