[Toybox] [PATCH] sh: fflush(stdout) to make sure that prompt is shown

Patrick Oppenlander pattyo.lists at gmail.com
Mon Apr 9 21:48:26 PDT 2018


Found when testing with musl v1.1.19 on arm.

---
  toys/pending/sh.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/toys/pending/sh.c b/toys/pending/sh.c
index 0bfd32c..efa5c96 100644
--- a/toys/pending/sh.c
+++ b/toys/pending/sh.c
@@ -307,6 +307,7 @@ static void do_prompt(void)
  down:
      putchar(c);
    }
+  fflush(stdout);
  }
  
  void sh_main(void)
-- 
2.17.0



More information about the Toybox mailing list