Skip to content

fix(race): use O_CREAT|O_EXCL for atomic PID lock#512

Open
dumko2001 wants to merge 1 commit intovivekchand:mainfrom
dumko2001:fix-006
Open

fix(race): use O_CREAT|O_EXCL for atomic PID lock#512
dumko2001 wants to merge 1 commit intovivekchand:mainfrom
dumko2001:fix-006

Conversation

@dumko2001
Copy link
Copy Markdown
Contributor

Summary

Fix TOCTOU race in PID lock file creation.

Changes

  • Use O_CREAT|O_EXCL flags for atomic lock file creation
  • Prevents race condition where two processes could create lock simultaneously

Testing

tests/test_pid_lock.py - verifies atomic lock behavior

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