diff --git a/src/core/exec.c b/src/core/exec.c index bcd990e0..49261194 100644 --- a/src/core/exec.c +++ b/src/core/exec.c @@ -31,6 +31,9 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include #include #include +#include +#include +#include #include #include @@ -564,8 +567,12 @@ static int sleep_exec ( int argc, char **argv ) { /* Delay for specified number of seconds */ start = currticks(); delay = ( seconds * TICKS_PER_SEC ); - while ( ( currticks() - start ) <= delay ) + while ( ( currticks() - start ) <= delay ) { + step(); + if ( iskey() && ( getchar() == CTRL_C ) ) + return -ECANCELED; cpu_nap(); + } return 0; }