Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 91082
Collapse All | Expand All

(-)a/bin/emerge (+2 lines)
Lines 3-8 Link Here
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
4
5
from __future__ import print_function
5
from __future__ import print_function
6
from portage.output import xtermTitleCont
6
7
7
import sys
8
import sys
8
# This block ensures that ^C interrupts are handled quietly.
9
# This block ensures that ^C interrupts are handled quietly.
Lines 19-24 try: Link Here
19
	# Prevent "[Errno 32] Broken pipe" exceptions when
20
	# Prevent "[Errno 32] Broken pipe" exceptions when
20
	# writing to a pipe.
21
	# writing to a pipe.
21
	signal.signal(signal.SIGPIPE, signal.SIG_DFL)
22
	signal.signal(signal.SIGPIPE, signal.SIG_DFL)
23
	signal.signal(signal.SIGCONT, xtermTitleCont)
22
24
23
except KeyboardInterrupt:
25
except KeyboardInterrupt:
24
	sys.exit(1)
26
	sys.exit(1)
(-)a/pym/portage/output.py (+13 lines)
Lines 239-246 _legal_terms_re = re.compile(r'^(xterm|xterm-color|Eterm|aterm|rxvt|screen|kterm Link Here
239
_disable_xtermTitle = None
239
_disable_xtermTitle = None
240
_max_xtermTitle_len = 253
240
_max_xtermTitle_len = 253
241
241
242
prev_title = None
243
prev_raw = False
244
def xtermTitleCont(signum, frame):
245
	# Restore last written xterm title on SIGCONT
246
	xtermTitle(prev_title, prev_raw)
247
242
def xtermTitle(mystr, raw=False):
248
def xtermTitle(mystr, raw=False):
243
	global _disable_xtermTitle
249
	global _disable_xtermTitle
250
	global prev_title
251
	global prev_raw
252
253
	# Store title, so it can be restored on SIGCONT
254
	prev_title = mystr
255
	prev_raw = raw
256
244
	if _disable_xtermTitle is None:
257
	if _disable_xtermTitle is None:
245
		_disable_xtermTitle = not (sys.stderr.isatty() and \
258
		_disable_xtermTitle = not (sys.stderr.isatty() and \
246
		'TERM' in os.environ and \
259
		'TERM' in os.environ and \

Return to bug 91082