diff options
Diffstat (limited to 'bitbake')
| -rw-r--r-- | bitbake/lib/bb/cooker.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index d1ab4aa17b..b7d7a7ec21 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
| @@ -30,7 +30,7 @@ import logging | |||
| 30 | import multiprocessing | 30 | import multiprocessing |
| 31 | import sre_constants | 31 | import sre_constants |
| 32 | import threading | 32 | import threading |
| 33 | from io import StringIO | 33 | from io import StringIO, UnsupportedOperation |
| 34 | from contextlib import closing | 34 | from contextlib import closing |
| 35 | from functools import wraps | 35 | from functools import wraps |
| 36 | from collections import defaultdict, namedtuple | 36 | from collections import defaultdict, namedtuple |
| @@ -230,14 +230,17 @@ class BBCooker: | |||
| 230 | pass | 230 | pass |
| 231 | 231 | ||
| 232 | # TOSTOP must not be set or our children will hang when they output | 232 | # TOSTOP must not be set or our children will hang when they output |
| 233 | fd = sys.stdout.fileno() | 233 | try: |
| 234 | if os.isatty(fd): | 234 | fd = sys.stdout.fileno() |
| 235 | import termios | 235 | if os.isatty(fd): |
| 236 | tcattr = termios.tcgetattr(fd) | 236 | import termios |
| 237 | if tcattr[3] & termios.TOSTOP: | 237 | tcattr = termios.tcgetattr(fd) |
| 238 | buildlog.info("The terminal had the TOSTOP bit set, clearing...") | 238 | if tcattr[3] & termios.TOSTOP: |
| 239 | tcattr[3] = tcattr[3] & ~termios.TOSTOP | 239 | buildlog.info("The terminal had the TOSTOP bit set, clearing...") |
| 240 | termios.tcsetattr(fd, termios.TCSANOW, tcattr) | 240 | tcattr[3] = tcattr[3] & ~termios.TOSTOP |
| 241 | termios.tcsetattr(fd, termios.TCSANOW, tcattr) | ||
| 242 | except UnsupportedOperation: | ||
| 243 | pass | ||
| 241 | 244 | ||
| 242 | self.command = bb.command.Command(self) | 245 | self.command = bb.command.Command(self) |
| 243 | self.state = state.initial | 246 | self.state = state.initial |
