Skip to content

Conversation

@jasjivsingh-corp
Copy link
Contributor

These changes are improvement on #149

Changes

  • Added keysinuse_atfork_prepare() and keysinuse_atfork_parent() handlers
  • Added helper functions keysinuse_lock_key_ctx() and keysinuse_unlock_key_ctx()
  • Simplified keysinuse_atfork_reinit() - no longer needs to handle locking since prepare already acquired all locks
  • Simplified keysinuse_reset_key_ctx() - lock recreation moved after counter reset

Testing

  • Tested with nginx worker process forking
  • Ran KeysInUseTest

@mamckee
Copy link
Collaborator

mamckee commented Dec 11, 2025

static void keysinuse_reset_key_ctx(SCOSSL_KEYSINUSE_CTX_IMP *ctx)

Maybe rename this to keysinuse_atfork_reset_key_ctx so it's clear this is only to be used in the atfork #Resolved


Refers to: KeysInUse/keysinuse.c:812 in b0a136e. [](commit_id = b0a136e, deletion_comment = False)

Copy link
Collaborator

@mamckee mamckee left a comment

Choose a reason for hiding this comment

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

LGTM once the comments are addressed.

Copy link
Collaborator

@mamckee mamckee left a comment

Choose a reason for hiding this comment

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

:shipit:

@jasjivsingh-corp jasjivsingh-corp merged commit 1cc5fd9 into main Dec 12, 2025
3 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.

3 participants