Merge lp:~spiv/bzr/no-sigwinch-583941 into lp:bzr/2.1
Status: | Merged |
---|---|
Approved by: | Andrew Bennetts |
Approved revision: | no longer in the source branch. |
Merged at revision: | 4844 |
Proposed branch: | lp:~spiv/bzr/no-sigwinch-583941 |
Merge into: | lp:bzr/2.1 |
Diff against target: |
204 lines (+66/-40) 4 files modified
NEWS (+7/-1) bzrlib/osutils.py (+47/-35) bzrlib/tests/test_osutils.py (+12/-0) bzrlib/ui/text.py (+0/-4) |
To merge this branch: | bzr merge lp:~spiv/bzr/no-sigwinch-583941 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vincent Ladeuil | Approve | ||
Martin Pool | Pending | ||
Martin Packman | Pending | ||
Review via email: mp+26118@code.launchpad.net |
This proposal supersedes a proposal from 2010-05-26.
Commit message
Remove the SIGWINCH handler to avoid EINTR problems. Instead poll the terminal size as needed. (#583941)
Description of the change
Final, simple fix for EINTR?
This simply removes the SIGWINCH handler introduced in 2.1.0rc1, and adjusts the osutils.
I'm a little concerned that the logic inside terminal_width looks somewhat different now, because it tries _terminal_size before it tries $COLUMNS — but, strangely, the SIGWINCH handler had actually been setting $COLUMNS, so I don't think this is actually so different. And I do think the new code is clearer. I'd welcome second opinions though.
Finally, here's the diffstat to whet your appetite:
$ bzr diff | diffstat
NEWS | 8 +++++++-
bzrlib/osutils.py | 42 +++++++
bzrlib/ui/text.py | 4 ----
3 files changed, 16 insertions(+), 38 deletions(-)
As with the previous proposal for this, I've tested interactively that e.g. bzr log -n0 from a large HTTP branch continues successfully while the terminal is rapidly resized, unlike before.
DoIt - love to get this behind us