~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/ssh.py

  • Committer: Ian Clatworthy
  • Date: 2010-03-30 20:13:52 UTC
  • mto: This revision was merged to the branch mainline in revision 5125.
  • Revision ID: ian.clatworthy@canonical.com-20100330201352-vw2gtujybyg3rvwc
whitespace fix in win32 installer

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 Robey Pointer <robey@lag.net>
 
1
# Copyright (C) 2006-2010 Robey Pointer <robey@lag.net>
2
2
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
173
173
register_ssh_vendor = _ssh_vendor_manager.register_vendor
174
174
 
175
175
 
176
 
def _ignore_sigint():
 
176
def _ignore_signals():
177
177
    # TODO: This should possibly ignore SIGHUP as well, but bzr currently
178
178
    # doesn't handle it itself.
179
179
    # <https://launchpad.net/products/bzr/+bug/41433/+index>
180
180
    import signal
181
181
    signal.signal(signal.SIGINT, signal.SIG_IGN)
 
182
    # GZ 2010-02-19: Perhaps make this check if breakin is installed instead
 
183
    if signal.getsignal(signal.SIGQUIT) != signal.SIG_DFL:
 
184
        signal.signal(signal.SIGQUIT, signal.SIG_IGN)
182
185
 
183
186
 
184
187
class SocketAsChannelAdapter(object):
634
637
        # Running it in a separate process group is not good because then it
635
638
        # can't get non-echoed input of a password or passphrase.
636
639
        # <https://launchpad.net/products/bzr/+bug/40508>
637
 
        return {'preexec_fn': _ignore_sigint,
 
640
        return {'preexec_fn': _ignore_signals,
638
641
                'close_fds': True,
639
642
                }
640
643