diff --git a/avocado/utils/process.py b/avocado/utils/process.py index f0ef51ef23..b5288e2b87 100644 --- a/avocado/utils/process.py +++ b/avocado/utils/process.py @@ -485,7 +485,10 @@ def _drainer(self): if not has_io: # Don't read unless there are new data available continue - tmp = os.read(self.fd, 8192) + try: + tmp = os.read(self.fd, 8192) + except OSError: + break if not tmp: break self.data.write(tmp)