From 82e64fc14eec9f01f5fee12782046496ebed9c72 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 21 Nov 2015 22:24:45 +0100 Subject: environment: Correctly handle abnormal exits. Fixes . * guix/scripts/environment.scm (status->exit-code): New procedure. (exit/status, primitive-exit/status): Use it. * tests/guix-environment-container.sh: Add test. --- tests/guix-environment-container.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/guix-environment-container.sh b/tests/guix-environment-container.sh index 5670d01117..703ab31d27 100644 --- a/tests/guix-environment-container.sh +++ b/tests/guix-environment-container.sh @@ -81,3 +81,10 @@ grep $(guix build guile-bootstrap) $tmpdir/mounts grep -e "$NIX_STORE_DIR/.*-bash" $tmpdir/mounts # bootstrap bash rm $tmpdir/mounts + +if guix environment --bootstrap --container \ + --ad-hoc bootstrap-binaries -- kill -SEGV 2 +then false; +else + test $? -gt 127 +fi -- cgit v1.2.3