Fixed some troubles

This commit is contained in:
2026-03-16 18:00:04 +03:00
parent 04dba21ddc
commit b0d0a323ee
6 changed files with 119 additions and 66 deletions

View File

@@ -146,10 +146,12 @@ int main(int argc, char **argv){
ERRX("Can't open error log %s", G.errlog);
else
fprintf(errlog, "# time Xerr'' Yerr'' // target - real\n");
setbuf(errlog, NULL);
}
if(G.coordsoutput){
if(!(fcoords = fopen(G.coordsoutput, "w")))
ERRX("Can't open %s", G.coordsoutput);
setbuf(fcoords, NULL);
}else fcoords = stdout;
Config = readServoConf(G.conffile);
if(!Config || G.dumpconf){
@@ -178,7 +180,7 @@ int main(int argc, char **argv){
signal(SIGINT, signals); // ctrl+C - quit
signal(SIGQUIT, signals); // ctrl+\ - quit
signal(SIGTSTP, SIG_IGN); // ignore ctrl+Z
chk0(G.Ncycles);
// chk0(G.Ncycles);
logmnt(fcoords, NULL);
if(pthread_create(&dthr, NULL, dumping, NULL)) ERRX("Can't run dump thread");
;