Describe the bug
The file comparison routine in seds_verify_final_file() is missing the call to fclose() and thus leaving stale filehandles open.
To Reproduce
Check the number of open file handles as the EDS tool executes (by e.g. checking /proc)
Expected behavior
Should not leave filehandles open after the script runs
System observed on:
Debian
Additional context
At some point, the code was changed to write output to a temp file first, then rename it to the intended name. Also, a quick "compare" is done - if the file is the same, the rename is skipped. This avoids updating the timestamp, which in turn avoids unnecessarily rebuilding all the other code that depended on the file.
It is specifically the file comparison that is missing the fclose(), and thus leaving files open.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
Describe the bug The file comparison routine in
seds_verify_final_file()
is missing the call tofclose()
and thus leaving stale filehandles open.To Reproduce Check the number of open file handles as the EDS tool executes (by e.g. checking
/proc
)Expected behavior Should not leave filehandles open after the script runs
System observed on: Debian
Additional context At some point, the code was changed to write output to a temp file first, then rename it to the intended name. Also, a quick "compare" is done - if the file is the same, the rename is skipped. This avoids updating the timestamp, which in turn avoids unnecessarily rebuilding all the other code that depended on the file.
It is specifically the file comparison that is missing the
fclose()
, and thus leaving files open.Reporter Info Joseph Hickey, Vantage Systems, Inc.