diff options
author | Thomas White <taw@physics.org> | 2021-03-04 12:19:44 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-03-04 12:21:36 +0100 |
commit | 6ebf9236668e365f836da7b4eee75cce74ba25d2 (patch) | |
tree | 95a2967748d772a63590ce2b47f24f018dc26e46 /src | |
parent | e49c4d6603c10f1b5da73c75ff39c477a0442c1a (diff) |
read_number_processed: Only look at end of log file
Diffstat (limited to 'src')
-rw-r--r-- | src/gui_index.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui_index.c b/src/gui_index.c index 589e0281..98f8a84c 100644 --- a/src/gui_index.c +++ b/src/gui_index.c @@ -799,6 +799,9 @@ int read_number_processed(const char *filename) /* Normal situation if SLURM job hasn't started yet */ if ( fh == NULL ) return 0; + /* Only look at the last part of the file */ + fseek(fh, -4096, SEEK_END); + do { char line[1024]; if ( fgets(line, 1024, fh) == NULL ) break; |