Merge lp:~lifeless/zconfig/bug-481512 into lp:~fdrake/zconfig/trunk
Proposed by
Robert Collins
on 2012-09-04
| Status: | Needs review | ||||
|---|---|---|---|---|---|
| Proposed branch: | lp:~lifeless/zconfig/bug-481512 | ||||
| Merge into: | lp:~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:~lifeless/zconfig/bug-481512 | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Curtis Hovey (community) | code | Approve on 2012-09-12 | |
| Fred Drake | 2012-09-04 | Pending | |
|
Review via email:
|
|||
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 on 2012-09-04
-
Flush, hopefully safely.
- 502. By Robert Collins on 2012-09-04
-
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.