On Mon, Nov 24, 2014 at 03:39:58PM -0700, Todd C. Miller wrote:
> On Tue, 25 Nov 2014 00:36:49 +0200, Kaspars Bankovskis wrote:
> 
> > Well, another approach..
> 
> I think it makes more sense to make it line buffered.
> 
>  - todd
> 

Something like this?


Index: fetch.c
===================================================================
RCS file: /cvs/src/usr.bin/ftp/fetch.c,v
retrieving revision 1.134
diff -u -p -r1.134 fetch.c
--- fetch.c     31 Oct 2014 13:48:21 -0000      1.134
+++ fetch.c     24 Nov 2014 22:49:06 -0000
@@ -515,6 +515,10 @@ noslash:
        }
 #endif /* !SMALL */
 
+       /* ensure consistent order of the output */
+       if (verbose)
+               setlinebuf(ttyout);
+
        s = -1;
        for (res = res0; res; res = res->ai_next) {
                if (getnameinfo(res->ai_addr, res->ai_addrlen, hbuf,

Reply via email to