~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Martin Pool
  • Date: 2010-02-23 07:43:11 UTC
  • mfrom: (4797.2.20 2.1)
  • mto: This revision was merged to the branch mainline in revision 5055.
  • Revision ID: mbp@sourcefrog.net-20100223074311-gnj55xdhrgz9l94e
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():