diff --git a/avocado/utils/process.py b/avocado/utils/process.py index 40907e5e81..bb1cee04cf 100644 --- a/avocado/utils/process.py +++ b/avocado/utils/process.py @@ -487,7 +487,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)