[Bug 997] HUSH: redirecting output of the last line of "printf" does not work

bugzilla at busybox.net bugzilla at busybox.net
Wed Jan 27 22:30:45 UTC 2010


https://bugs.busybox.net/show_bug.cgi?id=997





--- Comment #2 from Denys Vlasenko <vda.linux at googlemail.com>  2010-01-27 22:30:44 UTC ---
Does it help if you add a fflush(NULL) in hush.c like this:

static int run_applet_main(char **argv, int (*applet_main_func)(int argc, char
**argv))
{
        int argc = 0;
        while (*argv) {
                argc++;
                argv++;
        }
-       return applet_main_func(argc, argv - argc);
+       argc = applet_main_func(argc, argv - argc);
+       fflush(NULL);
+       return argc;
}


-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list