]> git.ipfire.org Git - thirdparty/strongswan.git/blobdiff - src/libcharon/plugins/lookip/lookip.c
lookip: Use line buffering for stdout
[thirdparty/strongswan.git] / src / libcharon / plugins / lookip / lookip.c
index d473c7022e17eedb8e01a80d9fa34dca20d3b612..6d82e1a172ca89f20e981f38dd9e2d75836793e2 100644 (file)
@@ -203,7 +203,6 @@ static int interactive(int fd)
                int res;
 
                printf("> ");
-               fflush(stdout);
 
                if (fgets(line, sizeof(line), stdin))
                {
@@ -266,6 +265,8 @@ int main(int argc, char *argv[])
                return 1;
        }
 
+       setvbuf(stdout, NULL, _IOLBF, 0);
+
        if (argc == 1)
        {
                res = interactive(fd);