changeset 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 d9f5630e900d
children 91ea7a4a0b4d
files rvinterf/lowlevel/rvifmain.c rvinterf/lowlevel/rvtdump.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
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();
--- a/rvinterf/lowlevel/rvtdump.c	Mon Apr 21 02:14:34 2014 +0000
+++ b/rvinterf/lowlevel/rvtdump.c	Tue Apr 22 03:39:15 2014 +0000
@@ -70,8 +70,8 @@
 			perror(logfname);
 			exit(1);
 		}
+		setlinebuf(logF);
 		fprintf(logF, "*** Log of decoded RVT output ***\n");
-		setlinebuf(logF);
 	}
 	if (background) {
 		c = fork();