[Checkins] [zopefoundation/zope.server] bfd9f7: Fix pipetrigger.close() to close the right file de...
GitHub
noreply at github.com
Tue Nov 13 11:11:59 CET 2018
Branch: refs/heads/master
Home: https://github.com/zopefoundation/zope.server
Commit: bfd9f7bad9d2b0b2a2367a17ddd0587449e35716
https://github.com/zopefoundation/zope.server/commit/bfd9f7bad9d2b0b2a2367a17ddd0587449e35716
Author: Marius Gedminas <marius at gedmin.as>
Date: 2018-10-19 (Fri, 19 Oct 2018)
Changed paths:
M CHANGES.rst
M src/zope/server/tests/test_trigger.py
M src/zope/server/trigger.py
Log Message:
-----------
Fix pipetrigger.close() to close the right file descriptors
Here's what was happening:
- pipetrigger.__init__() creates two file descriptors by invoking os.pipe(),
let's call them r1 and w1
- asyncore.file_dispatcher.__init__() wraps r1 in a file_wrapper() that
does an os.dup(), creating r2
- pipetrigger.__init__() closes r1
- pipetrigger.__init__() keeps self._fd = (r1, w1) despite r1 being
closed already!
- pipetrigger._close() closes all desciptors from self._fd, closing r1
again (causing an OSError for EBADF or closing a random real file the
program still wants to use), but doesn't close self.socket, which is
the file_wrapper instance holding r2 open.
I also had to fix one test that was calling trigger.close() and
expecting trigger.recv() to keep working afterwards.
Commit: fb5f908e700f57be3794b449d0ea9789d524ab05
https://github.com/zopefoundation/zope.server/commit/fb5f908e700f57be3794b449d0ea9789d524ab05
Author: Marius Gedminas <marius at gedmin.as>
Date: 2018-10-19 (Fri, 19 Oct 2018)
Changed paths:
M src/zope/server/trigger.py
Log Message:
-----------
No need to paper over EBADF errors any more!
Now the bug is fixed, we're not expecting os.close() to fail.
Commit: 47c5f3c37544c4f17634719c681d4808f7a24606
https://github.com/zopefoundation/zope.server/commit/47c5f3c37544c4f17634719c681d4808f7a24606
Author: Marius Gedminas <marius at gedmin.as>
Date: 2018-10-19 (Fri, 19 Oct 2018)
Changed paths:
M .travis.yml
M CHANGES.rst
M appveyor.yml
M setup.py
M tox.ini
Log Message:
-----------
Merge branch 'master' into fix-pipetrigger
Commit: 63f7863bfab3a580e225bbab3cd20df0e8eebd32
https://github.com/zopefoundation/zope.server/commit/63f7863bfab3a580e225bbab3cd20df0e8eebd32
Author: Marius Gedminas <marius at gedmin.as>
Date: 2018-11-13 (Tue, 13 Nov 2018)
Changed paths:
M CHANGES.rst
M src/zope/server/tests/test_trigger.py
M src/zope/server/trigger.py
Log Message:
-----------
Merge pull request #14 from zopefoundation/fix-pipetrigger
Fix pipetrigger.close() to close the right file descriptors
Compare: https://github.com/zopefoundation/zope.server/compare/1fcd85626a30...63f7863bfab3
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
More information about the checkins
mailing list