~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-23 08:22:05 UTC
  • mfrom: (5053.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100223082205-nn2nzonavf8sfuae
(mbp) merge 2.1 back to trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1440
1440
    if width is not None:
1441
1441
        os.environ['COLUMNS'] = str(width)
1442
1442
 
1443
 
if sys.platform == 'win32':
1444
 
    # Martin (gz) mentioned WINDOW_BUFFER_SIZE_RECORD from ReadConsoleInput but
1445
 
    # I've no idea how to plug that in the current design -- vila 20091216
1446
 
    pass
1447
 
else:
1448
 
    signal.signal(signal.SIGWINCH, _terminal_size_changed)
 
1443
 
 
1444
_registered_sigwinch = False
 
1445
 
 
1446
def watch_sigwinch():
 
1447
    """Register for SIGWINCH, once and only once."""
 
1448
    global _registered_sigwinch
 
1449
    if not _registered_sigwinch:
 
1450
        if sys.platform == 'win32':
 
1451
            # Martin (gz) mentioned WINDOW_BUFFER_SIZE_RECORD from
 
1452
            # ReadConsoleInput but I've no idea how to plug that in
 
1453
            # the current design -- vila 20091216
 
1454
            pass
 
1455
        else:
 
1456
            signal.signal(signal.SIGWINCH, _terminal_size_changed)
 
1457
        _registered_sigwinch = True
1449
1458
 
1450
1459
 
1451
1460
def supports_executable():