summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-10-09 12:33:40 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-10-10 09:00:49 -0400
commita72ccbc25125d0d14cabdc1b0f824f27bb64478b (patch)
treecc5f9b57857a279e839afb0a52a59e7082415c6f /gnu
parentf5a21dc4cfe24a97d6af19683af4dc21f20916af (diff)
downloadguix-a72ccbc25125d0d14cabdc1b0f824f27bb64478b.tar.gz
build: container: Fix call-with-clean-exit.
Before, call-with-clean-exit would *always* return an exit code of 1.

* gnu/build/linux-container.scm (call-with-clean-exit): Exit with status
  code of 0 if thunk does not throw an exception.
* tests/containers.scm: Add test.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/build/linux-container.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm
index 95220d0bc0..e911494058 100644
--- a/gnu/build/linux-container.scm
+++ b/gnu/build/linux-container.scm
@@ -36,7 +36,9 @@
   "Apply THUNK, but exit with a status code of 1 if it fails."
   (dynamic-wind
     (const #t)
-    thunk
+    (lambda ()
+      (thunk)
+      (primitive-exit 0))
     (lambda ()
       (primitive-exit 1))))