Merge lp://staging/~lifeless/zconfig/bug-481512 into lp://staging/~fdrake/zconfig/trunk
Proposed by
Robert Collins
Status: | Needs review | ||||
---|---|---|---|---|---|
Proposed branch: | lp://staging/~lifeless/zconfig/bug-481512 | ||||
Merge into: | lp://staging/~fdrake/zconfig/trunk | ||||
Diff against target: |
100 lines (+41/-33) 2 files modified
ZConfig/components/logger/loghandler.py (+41/-16) ZConfig/components/logger/tests/test_logger.py (+0/-17) |
||||
To merge this branch: | bzr merge lp://staging/~lifeless/zconfig/bug-481512 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | code | Approve | |
Fred Drake | Pending | ||
Review via email: mp+122612@code.staging.launchpad.net |
Description of the change
This is an alternative fix for the signal handling race condition.
It:
- sets a flag atomically, by binding a name to True.
- does a flush of the stream
- changes the reopen and close orders to prevent self.stream being a closed file.
To post a comment you must log in.
Unmerged revisions
- 503. By Robert Collins
-
Flush, hopefully safely.
- 502. By Robert Collins
-
Another approach for dealing with race conditions in reopen when used from signal handlers.
Hi Robert.
I think the code and safe and okay to land. Before you do land, Review the comment in line 51+. I think line 55 is from an earlier edit and it does not make sense.