[PATCH v2 01/11] console: unconditionally run poller_call in ctrlc()
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Mar 1 11:00:56 GMT 2021
From: Ahmad Fatoum <ahmad at a3f.at>
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 poller_call() first thing in ctrlc().
Signed-off-by: Ahmad Fatoum <ahmad at a3f.at>
---
common/console.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/console.c b/common/console.c
index 306149c99ea1..974d3de9e483 100644
--- a/common/console.c
+++ b/common/console.c
@@ -579,14 +579,14 @@ int ctrlc(void)
{
int ret = 0;
+ poller_call();
+
if (!ctrlc_allowed)
return 0;
if (ctrlc_abort)
return 1;
- poller_call();
-
#ifdef ARCH_HAS_CTRLC
ret = arch_ctrlc();
#else
--
2.29.2
More information about the barebox
mailing list