1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-17 10:33:49 +01:00

x86: fix up make term for x86

When qemu-i386 shuts down the instance on its own accord, like in the
hello-world example, then the terminal is broken afterwards.

This PR ensures that the terminal flags are restored on shutdown.
This commit is contained in:
René Kijewski 2014-06-23 18:02:16 +02:00
parent c9c1f0d7fe
commit ceb8ea2a3f

View File

@ -16,12 +16,14 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import atexit
import os import os
import readline import readline
import socket import socket
import signal import signal
import subprocess import subprocess
import sys import sys
import termios
import threading import threading
from datetime import datetime from datetime import datetime
@ -121,4 +123,7 @@ def main(QEMU, BINDIRBASE, HEXFILE, DEBUGGER=None):
if __name__ == '__main__': if __name__ == '__main__':
print("Type 'exit' to exit.") print("Type 'exit' to exit.")
atexit.register(termios.tcsetattr, 0, termios.TCSAFLUSH, termios.tcgetattr(0))
sys.exit(main(*sys.argv[1:])) sys.exit(main(*sys.argv[1:]))