summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildstream/_artifactcache/artifactcache.py3
-rw-r--r--buildstream/sandbox/_sandboxbwrap.py7
-rw-r--r--buildstream/sandbox/_sandboxchroot.py7
3 files changed, 15 insertions, 2 deletions
diff --git a/buildstream/_artifactcache/artifactcache.py b/buildstream/_artifactcache/artifactcache.py
index fc59c48a4..246a7691d 100644
--- a/buildstream/_artifactcache/artifactcache.py
+++ b/buildstream/_artifactcache/artifactcache.py
@@ -168,3 +168,6 @@ class ArtifactCache():
#
def remote_contains(self, element, strength=None):
return False
+
+ def fetch_remote_refs(self):
+ pass
diff --git a/buildstream/sandbox/_sandboxbwrap.py b/buildstream/sandbox/_sandboxbwrap.py
index df72eead7..d0b1c5171 100644
--- a/buildstream/sandbox/_sandboxbwrap.py
+++ b/buildstream/sandbox/_sandboxbwrap.py
@@ -304,7 +304,12 @@ class SandboxBwrap(Sandbox):
except psutil.NoSuchProcess:
pass
- exit_code = process.poll()
+ # Return the exit code - see the documentation for
+ # os.WEXITSTATUS to see why this is required.
+ if os.WIFEXITED(status):
+ exit_code = os.WEXITSTATUS(status)
+ else:
+ exit_code = -1
if interactive and stdin.isatty():
# Make this process the foreground process again, otherwise the
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