summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-xscripts/runqemu10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 311fbebdf4..26328e5b51 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -955,8 +955,8 @@ class BaseConfig(object):
955 def setup_network(self): 955 def setup_network(self):
956 if self.get('QB_NET') == 'none': 956 if self.get('QB_NET') == 'none':
957 return 957 return
958 cmd = "stty -g" 958 if sys.stdin.isatty():
959 self.saved_stty = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8') 959 self.saved_stty = subprocess.check_output("stty -g", shell=True).decode('utf-8')
960 self.network_device = self.get('QB_NETWORK_DEVICE') or self.network_device 960 self.network_device = self.get('QB_NETWORK_DEVICE') or self.network_device
961 if self.slirp_enabled: 961 if self.slirp_enabled:
962 self.setup_slirp() 962 self.setup_slirp()
@@ -1096,9 +1096,9 @@ class BaseConfig(object):
1096 self.qemu_opt += " -snapshot" 1096 self.qemu_opt += " -snapshot"
1097 1097
1098 if self.serialstdio: 1098 if self.serialstdio:
1099 logger.info("Interrupt character is '^]'") 1099 if sys.stdin.isatty():
1100 cmd = "stty intr ^]" 1100 subprocess.check_call("stty intr ^]", shell=True)
1101 subprocess.check_call(cmd, shell=True) 1101 logger.info("Interrupt character is '^]'")
1102 1102
1103 first_serial = "" 1103 first_serial = ""
1104 if not re.search("-nographic", self.qemu_opt): 1104 if not re.search("-nographic", self.qemu_opt):