Also except OSError when terminating a child.
authorHafiz Abid Qadeer <hafiz_abid@mentor.com>
Mon, 26 Jan 2015 12:03:05 +0000 (12:03 +0000)
committerHafiz Abid Qadeer <hafiz_abid@mentor.com>
Mon, 26 Jan 2015 12:03:05 +0000 (12:03 +0000)
Ilia K <ki.stfu@gmail.com> sent this patch. He noted that it was possible for
child to be terminated after isAlive call and before we send it quit command.
In this case, sending command to it causes OSError. This patch just adds this
exception to the except list.

llvm-svn: 227086

lldb/test/lldbtest.py

index c08fc8b..9c96018 100644 (file)
@@ -1072,7 +1072,7 @@ class Base(unittest2.TestCase):
                 self.child.sendline('settings set interpreter.prompt-on-quit false')
                 self.child.sendline('quit')
                 self.child.expect(pexpect.EOF)
-            except (ValueError, pexpect.ExceptionPexpect):
+            except (ValueError, OSError, pexpect.ExceptionPexpect):
                 # child is already terminated
                 pass
             finally: