Skip to content

Commit

Permalink
SpawnProcess._unregister: cancel PipeLogger (bug 658806)
Browse files Browse the repository at this point in the history
If the PipeLogger has not closed itself before the _unregister
method has been called, then it must be cancelled so that it
will close the log immediately. This fixes the case reported
in bug 658806, where an unclosed PipeLogger instance left the
log file with a temporarily incomplete gzip stream.

Bug: https://bugs.gentoo.org/658806
  • Loading branch information
zmedico committed Jun 23, 2018
1 parent 294f1a1 commit a9a62e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pym/_emerge/SpawnProcess.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ def _unregister(self):
if self.cgroup is not None:
self._cgroup_cleanup()
self.cgroup = None
if self._pipe_logger is not None:
self._pipe_logger.cancel()
self._pipe_logger = None

def _cancel(self):
SubProcess._cancel(self)
Expand Down

0 comments on commit a9a62e5

Please sign in to comment.