From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: knotty: Deal with exceptions not resetting terminal configuration
Date: Sun, 09 Mar 2014 09:58:01 -0700 [thread overview]
Message-ID: <1394384281.7883.5.camel@ted> (raw)
When an exception occurred, the terminal parameters (such as echo)
may not be reset correctly. This change ensures they do get
atexit time in all cases, avoiding the terminal corruption issues
that could sometimes occur.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index c1ee9f52..3dada8e 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -31,6 +31,7 @@ import time
import fcntl
import struct
import copy
+import atexit
from bb.ui import uihelper
logger = logging.getLogger("BitBake")
@@ -303,6 +304,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
taskfailures = []
termfilter = tf(main, helper, console, format)
+ atexit.register(termfilter.finish)
while True:
try:
@@ -536,6 +538,4 @@ def main(server, eventHandler, params, tf = TerminalFilter):
if return_value == 0:
return_value = 1
- termfilter.finish()
-
return return_value
reply other threads:[~2014-03-09 16:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1394384281.7883.5.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox