reset: before calling execvp(), reset needs to flush stdout
authorGlenn Matthews <glmatthe@cisco.com>
Fri, 17 Feb 2017 22:01:13 +0000 (23:01 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 17 Feb 2017 22:02:06 +0000 (23:02 +0100)
Signed-off-by: Glenn Matthews <glmatthe@cisco.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
console-tools/reset.c

index 57cebb4ea9ce59105a7aab38aad203ea01cee2b5..587c0d11a99fe48d4112dfc7efc21901ac87aa2b 100644 (file)
@@ -56,6 +56,8 @@ int reset_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 #if ENABLE_STTY
                return stty_main(2, (char**)args);
 #else
+               /* Make sure stdout gets drained before we execvp */
+               fflush_all();
                execvp("stty", (char**)args);
 #endif
        }