Skip to content

Replaces 'flock' with mkdir locking#886

Merged
nothingmuch merged 1 commit intopayjoin:masterfrom
Johnosezele:fix/portable-file-locking
Jul 21, 2025
Merged

Replaces 'flock' with mkdir locking#886
nothingmuch merged 1 commit intopayjoin:masterfrom
Johnosezele:fix/portable-file-locking

Conversation

@Johnosezele
Copy link
Copy Markdown
Contributor

This PR replaces the Linux-specific flock command with a portable directory-based locking in the test.sh script. The change ensures compatibility across different Unix-like systems, including macOS, while maintaining the same functionality.

Testing
The locking mechanism has been verified with the following test cases:

  1. Running a single instance of the test script
  2. Attempting to run multiple instances concurrently
  3. Testing cleanup on normal script completion
  4. Testing cleanup on interruption (SIGINT, SIGTERM)

Closes #878

@Johnosezele Johnosezele force-pushed the fix/portable-file-locking branch from 742ee64 to 269036b Compare July 17, 2025 15:54
Comment thread contrib/test.sh Outdated
Comment thread contrib/test.sh Outdated
Comment thread contrib/test.sh Outdated
Comment thread contrib/test.sh Outdated
Comment thread contrib/test.sh Outdated
Comment thread contrib/test.sh
Comment thread contrib/test.sh Outdated
@Johnosezele Johnosezele force-pushed the fix/portable-file-locking branch from 269036b to 0701e44 Compare July 18, 2025 01:13
@Johnosezele Johnosezele requested a review from nothingmuch July 19, 2025 20:38
Copy link
Copy Markdown
Contributor

@nothingmuch nothingmuch left a comment

Choose a reason for hiding this comment

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

tACK

@coveralls
Copy link
Copy Markdown
Collaborator

Pull Request Test Coverage Report for Build 16359709624

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 85.766%

Totals Coverage Status
Change from base Build 16354703046: 0.0%
Covered Lines: 7652
Relevant Lines: 8922

💛 - Coveralls

@nothingmuch nothingmuch merged commit 88b918f into payjoin:master Jul 21, 2025
9 checks passed
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.

flock command is not portable, use mkdir on OSX

3 participants