diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-09-10 21:19:49 -0400 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-09-10 23:07:16 -0400 |
commit | be295512bb405b12a0008852ff74e36135700186 (patch) | |
tree | c7b040ef05467a7835000b1a2f4e7b5998a4a68b | |
parent | 9270d4214cfb66088dd8cf67123047229a08a541 (diff) | |
download | buildstream-testing-shell.tar.gz |
_sandboxbwrap.py: Make terminal control setting conditional on stdin being a ttytesting-shell
So that interactive sandbox mode can be used in a test or automated scenario.
-rw-r--r-- | buildstream/_sandboxbwrap.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/_sandboxbwrap.py b/buildstream/_sandboxbwrap.py index 11bbdc58b..af9cd51d6 100644 --- a/buildstream/_sandboxbwrap.py +++ b/buildstream/_sandboxbwrap.py @@ -387,7 +387,7 @@ class SandboxBwrap(Sandbox): process.communicate() exit_code = process.poll() - if interactive: + if interactive and stdin.isatty(): # Make this process the foreground process again, otherwise the # next read() on stdin will trigger SIGTTIN and stop the process. # This is required because the sandboxed process does not have |