summaryrefslogtreecommitdiff
path: root/Mailman/Logging/Syslog.py
diff options
context:
space:
mode:
authorbwarsaw2000-06-01 22:08:10 +0000
committerbwarsaw2000-06-01 22:08:10 +0000
commitc548706501246f9ba43523cc221cd991c57ac7f0 (patch)
tree08b0931a49d3fcc05ce243ca4c5d378026ceb0bd /Mailman/Logging/Syslog.py
parent3765eec5bbff791f73db77d2fb757b030fcbf1fb (diff)
downloadmailman-c548706501246f9ba43523cc221cd991c57ac7f0.tar.gz
mailman-c548706501246f9ba43523cc221cd991c57ac7f0.tar.zst
mailman-c548706501246f9ba43523cc221cd991c57ac7f0.zip
Fixes inspired or provided by Harald Meland. Specifically,
lock(): It is an expected condition that the global linkfile can have a linkcount of 1. This can arise due to a race condition between proc1 that is in the middle of unlocking, and proc2 which is trying to acquire the lock. In this case, we simply log the condition and try again later. Also, if we're already locked, we should not unlink our tmpfname. unlock(): We don't need to wrap self.locked() in a try/except. __break(): Updated the comment at the head of the method based on Harald's observation. Touching the lockfile doesn't eliminate the race condition, just makes it more unlikely. Also, we don't need to wrap the self.__read() in a try/except. Finally, elaborate the unit test suit to use /dev/random if it exists (i.e. on Linux).
Diffstat (limited to 'Mailman/Logging/Syslog.py')
0 files changed, 0 insertions, 0 deletions