mirror of
https://git.yoctoproject.org/poky
synced 2026-09-16 09:49:35 +02:00
bitbake: knotty: Deal with exceptions not resetting terminal configuration
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. (Bitbake rev: e1d89166f2dfe46412ff9a5610dd57b0cef74fe3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -31,6 +31,7 @@ import time
|
|||||||
import fcntl
|
import fcntl
|
||||||
import struct
|
import struct
|
||||||
import copy
|
import copy
|
||||||
|
import atexit
|
||||||
from bb.ui import uihelper
|
from bb.ui import uihelper
|
||||||
|
|
||||||
logger = logging.getLogger("BitBake")
|
logger = logging.getLogger("BitBake")
|
||||||
@@ -303,6 +304,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
|
|||||||
taskfailures = []
|
taskfailures = []
|
||||||
|
|
||||||
termfilter = tf(main, helper, console, format)
|
termfilter = tf(main, helper, console, format)
|
||||||
|
atexit.register(termfilter.finish)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
@@ -536,6 +538,4 @@ def main(server, eventHandler, params, tf = TerminalFilter):
|
|||||||
if return_value == 0:
|
if return_value == 0:
|
||||||
return_value = 1
|
return_value = 1
|
||||||
|
|
||||||
termfilter.finish()
|
|
||||||
|
|
||||||
return return_value
|
return return_value
|
||||||
|
|||||||
Reference in New Issue
Block a user