~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/ssh.py

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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