From: Ahmad Fatoum <ahmad@xxxxxx> ctrlc is allowed only after init and reboot mode scripts have run, so these scripts run uninterruptible. A side effect of this is that all calls to ctrlc() will immediately return with false without running the pollers. While init scripts shouldn't run too long, it's still surprising behavior. Thus call resched() first thing in ctrlc(). Signed-off-by: Ahmad Fatoum <ahmad@xxxxxx> --- common/console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/console.c b/common/console.c index a436c37aa3e8..8a0af75a1ff4 100644 --- a/common/console.c +++ b/common/console.c @@ -579,14 +579,14 @@ int ctrlc(void) { int ret = 0; + resched(); + if (!ctrlc_allowed) return 0; if (ctrlc_abort) return 1; - resched(); - #ifdef ARCH_HAS_CTRLC ret = arch_ctrlc(); #else -- 2.29.2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox