diff rvinterf/lowlevel/rvifmain.c @ 330:1171c32a637b

rvinterf & rvtdump: do setlinebuf() on the log file before emitting the header line, to avoid getting this line twice when forking for -b
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Tue, 22 Apr 2014 03:39:15 +0000
parents 4c416868524a
children d527ac304ad5
line wrap: on
line diff
--- a/rvinterf/lowlevel/rvifmain.c	Mon Apr 21 02:14:34 2014 +0000
+++ b/rvinterf/lowlevel/rvifmain.c	Tue Apr 22 03:39:15 2014 +0000
@@ -90,8 +90,8 @@
 			perror(logfname);
 			exit(1);
 		}
+		setlinebuf(logF);
 		fprintf(logF, "*** Log of rvinterf session ***\n");
-		setlinebuf(logF);
 	}
 	if (socketpair_fd)
 		create_socketpair_client();