diff options
author | Tristan Maat <tristan.maat@codethink.co.uk> | 2017-10-12 17:03:49 +0100 |
---|---|---|
committer | Tristan Maat <tristan.maat@codethink.co.uk> | 2017-10-19 14:04:00 +0100 |
commit | 0f7e5df53612bb04a92631a34014bb7dae3195fd (patch) | |
tree | 8e1c29792717b3565708f2256024adf0271b32e1 /buildstream/sandbox/_sandboxchroot.py | |
parent | 23c1e284ea748942e7067454aae2b279a1ab0e68 (diff) | |
download | buildstream-0f7e5df53612bb04a92631a34014bb7dae3195fd.tar.gz |
artifactcache.py: Fix missing fetch_remote_refs interface98-ctrl-c-doesn-t-properly-kill-a-non-interactive-shell
Diffstat (limited to 'buildstream/sandbox/_sandboxchroot.py')
-rw-r--r-- | buildstream/sandbox/_sandboxchroot.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/buildstream/sandbox/_sandboxchroot.py b/buildstream/sandbox/_sandboxchroot.py index 5aca493dd..de3220c22 100644 --- a/buildstream/sandbox/_sandboxchroot.py +++ b/buildstream/sandbox/_sandboxchroot.py @@ -172,7 +172,12 @@ class SandboxChroot(Sandbox): except psutil.NoSuchProcess: pass - code = process.poll() + # Return the exit code - see the documentation for + # os.WEXITSTATUS to see why this is required. + if os.WIFEXITED(status): + code = os.WEXITSTATUS(status) + else: + code = -1 except subprocess.SubprocessError as e: # Exceptions in preexec_fn are simply reported as |