]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: init: make stdout unbuffered
authorOlivier Houchard <ohouchard@haproxy.com>
Sat, 3 Feb 2018 14:15:21 +0000 (15:15 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 5 Feb 2018 13:15:20 +0000 (14:15 +0100)
printf is unusable for debugging without this, and printf() is not used
for anything else.

src/haproxy.c

index f1a2fb9d48190c5a5f441e80ee2beb82b47f7de3..67df6cdce915a5581706570efd2d65202ec4a879 100644 (file)
@@ -2492,6 +2492,7 @@ int main(int argc, char **argv)
        char errmsg[100];
        int pidfd = -1;
 
+       setvbuf(stdout, NULL, _IONBF, 0);
        init(argc, argv);
        signal_register_fct(SIGQUIT, dump, SIGQUIT);
        signal_register_fct(SIGUSR1, sig_soft_stop, SIGUSR1);