Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
powrdx <<= 1;
s = bc_num_mul(©, ©, ©, powrdx);
if (s) goto err;
+ // It is too slow to handle ^C only after entire "2^1000000" completes
+ if (G_interrupt) {
+ s = BC_STATUS_FAILURE;
+ goto err;
+ }
}
bc_num_copy(c, ©);
s = bc_num_mul(c, ©, c, resrdx);
if (s) goto err;
}
+ // It is too slow to handle ^C only after entire "2^1000000" completes
+ if (G_interrupt) {
+ s = BC_STATUS_FAILURE;
+ goto err;
+ }
}
if (neg) {