Skip to content

trivial: avoid a race condition with platform profile updates

Mario Limonciello requested to merge superm1/race into main

Multiple change events will come in during the course of writing an updated platform profile. If the daemon responds to both G_FILE_MONITOR_EVENT_CHANGED and G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT it could potentially race with the update and read an empty file.

Instead wait until specifically G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT to update the file.

Merge request reports