Skip to content

Add comment in winetricks_selfupdate and winetricks_selfupdate_rollback warning of race condition#2489

Open
GideonBear wants to merge 1 commit intoWinetricks:masterfrom
GideonBear:document-race-condition
Open

Add comment in winetricks_selfupdate and winetricks_selfupdate_rollback warning of race condition#2489
GideonBear wants to merge 1 commit intoWinetricks:masterfrom
GideonBear:document-race-condition

Conversation

@GideonBear
Copy link

Using cp, >, mv across filesystem boundaries, or other non-atomic ways of writing to a file, to overwrite a running shell script, can have catastrophic consequences (executing partial/mixed code).

Upon hearing winetricks does self-updates and is written in shell, I needed to check for myself if this race condition was accounted for. It is, but possibly not consciously.

In this PR I add comments warning any potential new hands on this code of the necessity of mv here.

@GideonBear GideonBear changed the title Add comment to in winetricks_selfupdate and winetricks_selfupdate_rollback warning of race condition Add comment in winetricks_selfupdate and winetricks_selfupdate_rollback warning of race condition Mar 13, 2026
@GideonBear GideonBear force-pushed the document-race-condition branch from fe12f8a to 514f0f8 Compare March 13, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant