Skip to content
Snippets Groups Projects
Commit 8f65507d authored by Ryan Gonzalez's avatar Ryan Gonzalez
Browse files

logger: Recreate output log files if they get deleted


Before writing a log line to the file, first check to make sure that
it's still around. If not, then just re-create it, so that clearing the
current logs out doesn't actually stop future logs from appearing.

This takes advantage of the existing fstat() setup that checks the file
size and swaps it out with stat() to be able to pick up on the file
going missing. (That change shouldn't introduce any notable race
conditions on the directory side, because srt-logger has already chdir'd
into the log file directly, and self->filename isn't a full path in the
first place.)

steamrt/tasks#487

Signed-off-by: default avatarRyan Gonzalez <ryan.gonzalez@collabora.com>
parent b03c2a25
No related branches found
No related tags found
Loading
Checking pipeline status
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment