Skip to content

Unlock without unlink #112

Merged
merged 3 commits into from Sep 17, 2021
Merged

Unlock without unlink #112

merged 3 commits into from Sep 17, 2021

Conversation

donald
Copy link
Contributor

@donald donald commented Sep 17, 2021

Fixes #111

We don't need to call flock(fd, LOCK_UN) for a file we are going to
close anyway, so don't do it.

This might make a difference if the lock fd was dupped into another fd.
Add function to release the lock without removing the logfile. This is
useful for forked children, which inherited the lock and just need to
give it up.
The reaper inherits the locked lock file and needs to unlock it. Use
mx_funlock_nodelete instead of mx_funlock so that the lock file is not
removed.
@donald donald merged commit 7b1c066 into master Sep 17, 2021
@donald donald deleted the unlock-without-unlink branch October 28, 2022 14:21
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.29.0: Warning in logfile
1 participant