wait for communication with closing program and close the stdin/out pipes
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 26 Mar 2020 11:01:33 +0000 (11:01 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 26 Mar 2020 11:01:33 +0000 (11:01 +0000)
src/soc/simulator/qemu.py

index c9b1b573dd22d3da0adb0415a0a6b8bb005c99c6..063bed6566b20a5e760bd0da226f4da4814cf062 100644 (file)
@@ -45,6 +45,9 @@ class QemuController:
     def exit(self):
         self.gdb.exit()
         self.qemu_popen.kill()
+        outs, errs = self.qemu_popen.communicate()
+        self.qemu_popen.stdout.close()
+        self.qemu_popen.stdin.close()
 
 
 def run_program(program):