Skip to content

Conversation

@victormlg
Copy link
Contributor

No description provided.

@victormlg victormlg requested a review from larsewi August 6, 2025 12:00
@larsewi
Copy link
Contributor

larsewi commented Aug 6, 2025

Another problem is that someone might be writing to the input file while you are copying it. You can use file locks like flock() to at least prevent other cf-remote applications from writing to it while you are reading it

@victormlg victormlg force-pushed the atomic_copy branch 2 times, most recently from bd4ba35 to b612cf0 Compare August 7, 2025 14:44
Copy link
Contributor

@larsewi larsewi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 🚀 Just a couple of comments

Made copy_file atomic using lock-free wack-a-mole algorithm

Ticket: CFE-4549
Signed-off-by: Victor Moene <[email protected]>
Signed-off-by: Victor Moene <[email protected]>
@larsewi larsewi merged commit 48566c0 into cfengine:master Aug 13, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants