comparison rvinterf/lowlevel/rvtdump.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 2f285f20d617
children d527ac304ad5
comparison
equal deleted inserted replaced
329:d9f5630e900d 330:1171c32a637b
68 logF = fopen(logfname, "w"); 68 logF = fopen(logfname, "w");
69 if (!logF) { 69 if (!logF) {
70 perror(logfname); 70 perror(logfname);
71 exit(1); 71 exit(1);
72 } 72 }
73 setlinebuf(logF);
73 fprintf(logF, "*** Log of decoded RVT output ***\n"); 74 fprintf(logF, "*** Log of decoded RVT output ***\n");
74 setlinebuf(logF);
75 } 75 }
76 if (background) { 76 if (background) {
77 c = fork(); 77 c = fork();
78 if (c < 0) { 78 if (c < 0) {
79 perror("fork"); 79 perror("fork");