You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In general, once the handle to /var/log/pihole.log is open, the file is open, and nobody changing the directory structure can change that - the file can be moved, renamed, or put something else in its place - it remains open by construction, as in Linux/Unix there is no real delete for files, but only unlink, which doesn't necessarily delete the file - it just removes the link from the directory.
However, if the underlying device disappears (e.g. /var/log is a ramdisk) then the file handle won't be valid an more and is likely to lead to unpredictable behavior. This is a potential issue for FTL.
Note: Even if the file handle becomes invalid, it can still be used (but will likely give I/O errors) and has also still to be closed!
The text was updated successfully, but these errors were encountered:
Proposed strategy: Don't use an ever open FILE pointer as connection to pihole.log, but rather get file size through stat() and only (try to) open pihole.log on demand (and when available!).
As this is a major and meanwhile critical change in strategy it will lead to FTL v2.0
In general, once the handle to
/var/log/pihole.log
is open, the file is open, and nobody changing the directory structure can change that - the file can be moved, renamed, or put something else in its place - it remains open by construction, as in Linux/Unix there is no real delete for files, but onlyunlink
, which doesn't necessarily delete the file - it just removes the link from the directory.However, if the underlying device disappears (e.g.
/var/log
is a ramdisk) then the file handle won't be valid an more and is likely to lead to unpredictable behavior. This is a potential issue forFTL
.Note: Even if the file handle becomes invalid, it can still be used (but will likely give I/O errors) and has also still to be closed!
The text was updated successfully, but these errors were encountered: