##// END OF EJS Templates
crecord: avoid setting non-existing SIGTSTP signal on windows (issue5512)...
Pierre-Yves David -
r31933:b2478a99 default
parent child Browse files
Show More
@@ -473,14 +473,17 b' def chunkselector(ui, headerlist, operat'
473 473 """
474 474 ui.write(_('starting interactive selection\n'))
475 475 chunkselector = curseschunkselector(headerlist, ui, operation)
476 f = signal.getsignal(signal.SIGTSTP)
476 origsigtstp = sentinel = object()
477 if util.safehasattr(signal, 'SIGTSTP'):
478 origsigtstp = signal.getsignal(signal.SIGTSTP)
477 479 try:
478 480 curses.wrapper(chunkselector.main)
479 481 if chunkselector.initerr is not None:
480 482 raise error.Abort(chunkselector.initerr)
481 483 # ncurses does not restore signal handler for SIGTSTP
482 484 finally:
483 signal.signal(signal.SIGTSTP, f)
485 if origsigtstp is not sentinel:
486 signal.signal(signal.SIGTSTP, origsigtstp)
484 487 return chunkselector.opts
485 488
486 489 def testdecorator(testfn, f):
General Comments 0
You need to be logged in to leave comments. Login now