Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 227459 Details for
Bug 91082
sys-apps/portage: [PATCH] xterm title not restored after SIGCONT
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Restores last written title string on SIGCONT
restore_title.patch (text/plain), 1.33 KB, created by
Vincent Launchbury
on 2010-04-12 04:48:13 UTC
(
hide
)
Description:
Restores last written title string on SIGCONT
Filename:
MIME Type:
Creator:
Vincent Launchbury
Created:
2010-04-12 04:48:13 UTC
Size:
1.33 KB
patch
obsolete
>diff --git a/bin/emerge b/bin/emerge >index 5d74bfa..2e9b723 100755 >--- a/bin/emerge >+++ b/bin/emerge >@@ -3,6 +3,7 @@ > # Distributed under the terms of the GNU General Public License v2 > > from __future__ import print_function >+from portage.output import xtermTitleCont > > import sys > # This block ensures that ^C interrupts are handled quietly. >@@ -19,6 +20,7 @@ try: > # Prevent "[Errno 32] Broken pipe" exceptions when > # writing to a pipe. > signal.signal(signal.SIGPIPE, signal.SIG_DFL) >+ signal.signal(signal.SIGCONT, xtermTitleCont) > > except KeyboardInterrupt: > sys.exit(1) >diff --git a/pym/portage/output.py b/pym/portage/output.py >index 0dc218e..c54be83 100644 >--- a/pym/portage/output.py >+++ b/pym/portage/output.py >@@ -239,8 +239,21 @@ _legal_terms_re = re.compile(r'^(xterm|xterm-color|Eterm|aterm|rxvt|screen|kterm > _disable_xtermTitle = None > _max_xtermTitle_len = 253 > >+prev_title = None >+prev_raw = False >+def xtermTitleCont(signum, frame): >+ # Restore last written xterm title on SIGCONT >+ xtermTitle(prev_title, prev_raw) >+ > def xtermTitle(mystr, raw=False): > global _disable_xtermTitle >+ global prev_title >+ global prev_raw >+ >+ # Store title, so it can be restored on SIGCONT >+ prev_title = mystr >+ prev_raw = raw >+ > if _disable_xtermTitle is None: > _disable_xtermTitle = not (sys.stderr.isatty() and \ > 'TERM' in os.environ and \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 91082
: 227459